Skip to content

Commit

Permalink
Fix test (#144)
Browse files Browse the repository at this point in the history
* Fix tests

* Minor change

* Order fix
  • Loading branch information
viskey98 authored and afeena committed Jun 17, 2018
1 parent b49878f commit 7634cb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_handle_html_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def test_handle_content_exception(self):
self.handler.get_dorks = AsyncMock(return_value=[])

async def test():
self.return_content = await self.handler.handle_html_content(self.content)
with self.assertRaises(IndexError):
self.return_content = await self.handler.handle_html_content(None)
with self.assertRaises(TypeError):
self.loop.run_until_complete(test())

def tearDown(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_handle_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_handle_response(self):
async def test():
await self.handler.handle_request(self.request, self.payload)
self.loop.run_until_complete(test())
aiohttp.Response.add_header.assert_has_calls(calls)
aiohttp.Response.add_header.assert_has_calls(calls, any_order=True)
aiohttp.Response.send_headers.assert_called_with()
aiohttp.Response.write.assert_called_with(self.content)
aiohttp.Response.write_eof.assert_called_with()
Expand Down

0 comments on commit 7634cb8

Please sign in to comment.