MCPcopy Create free account
hub / github.com/ahupp/python-magic / assert_result

Method assert_result

test/libmagic_test.py:20–23  ·  view source on GitHub ↗
(self, result)

Source from the content-addressed store, hash-verified

18 expected_name = ('PDF document, version 1.2', 'PDF document, version 1.2, 2 pages')
19
20 def assert_result(self, result):
21 self.assertEqual(result.mime_type, self.expected_mime_type)
22 self.assertEqual(result.encoding, self.expected_encoding)
23 self.assertIn(result.name, self.expected_name)
24
25 def test_detect_from_filename(self):
26 result = magic.detect_from_filename(self.filename)

Callers 3

test_detect_from_fobjMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected