From 33528682227836c6375c848bee8c767e42641fd8 Mon Sep 17 00:00:00 2001 From: Adam Hupp Date: Sat, 1 Sep 2018 16:34:13 -0700 Subject: Use INDIR_MAX rather than BYTES_MAX in tests since the latter wasn't supported until recently. Also, return .value from the ctypes wrapper so callers aren't required to. --- test/test.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/test.py') diff --git a/test/test.py b/test/test.py index 54ffe32..ab29def 100755 --- a/test/test.py +++ b/test/test.py @@ -125,13 +125,9 @@ class MagicTest(unittest.TestCase): magic.magic_buffer = old def test_getparam(self): - filename = os.path.join(self.TESTDATA_DIR, 'keep-going.jpg') - m = magic.Magic(mime=True) - self.assertEqual(m.getparam(magic.MAGIC_PARAM_BYTES_MAX).value, 1048576) - m.setparam(magic.MAGIC_PARAM_BYTES_MAX, 1) - self.assertEqual(m.getparam(magic.MAGIC_PARAM_BYTES_MAX).value, 1) - self.assertEqual(m.from_file(filename), 'application/octet-stream') + m.setparam(magic.MAGIC_PARAM_INDIR_MAX, 1) + self.assertEqual(m.getparam(magic.MAGIC_PARAM_INDIR_MAX), 1) if __name__ == '__main__': unittest.main() -- cgit v1.2.1