Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rjt-gupta committed Mar 24, 2019
1 parent ba76782 commit 8186a68
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions snare/tests/test_parse_tanner_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def setUp(self):
self.detection = None
self.expected_content = None
self.call_content = None
self.expected_header = None

def test_parse_type_one(self):
self.detection = {"type": 1}
Expand Down Expand Up @@ -85,15 +86,17 @@ def test_parse_type_two_with_headers(self):
}
}
}
self.expected_content = b'test.png'
self.content_type = 'image/png'
self.expected_header = {"content-type": "multipart/form-data"}

async def test():
(self.res1, self.res2,
self.res3, self.res4) = await self.handler.parse_tanner_response(self.requested_name, self.detection)

self.loop.run_until_complete(test())
expected_header = {"content-type": "multipart/form-data"}
real_result = [self.res1, self.res2, self.res3, self.res4]
expected_result = [b'test.png', 'image/png', expected_header, 200]
expected_result = [self.expected_content, self.content_type, self.expected_header, 200]
self.assertCountEqual(real_result, expected_result)

def test_parse_type_three(self):
Expand Down

0 comments on commit 8186a68

Please sign in to comment.