def test_detect_from_filename(self):
result = magic.detect_from_filename(self.filename)
self.assert_result(result)
def test_detect_from_fobj(self):
with open(self.filename, "rb") as fobj:
result = magic.detect_from_fobj(fobj)
self.assert_result(result)
def test_detect_from_content(self):
with open(self.filename, "rb") as fobj:
result = magic.detect_from_content(fobj.read(8192))
self.assert_result(result)