Lines Matching refs:self
15 def assert_result(self, result):
16 self.assertEqual(result.mime_type, self.expected_mime_type)
17 self.assertEqual(result.encoding, self.expected_encoding)
18 self.assertEqual(result.name, self.expected_name)
20 def test_detect_from_filename(self):
21 result = magic.detect_from_filename(self.filename)
22 self.assert_result(result)
24 def test_detect_from_fobj(self):
25 with open(self.filename) as fobj:
27 self.assert_result(result)
29 def test_detect_from_content(self):
30 with open(self.filename) as fobj:
32 self.assert_result(result)