class ImageFileParserTests(unittest.TestCase): def setUp(self): self.subject = FileParser() self.file_metadata = self.subject.parse("ddex/tests/resources/test.jpg") def test_should_have_height(self): self.assertEqual(self.file_metadata.height, 500) def test_should_have_width(self): self.assertEqual(self.file_metadata.width, 463) def test_should_have_codec(self): self.assertEqual(self.file_metadata.codec, "JPEG")
class ImageFileParserTests(unittest.TestCase): def setUp(self): self.subject = FileParser() self.file_metadata = self.subject.parse( "ddex/tests/resources/test.jpg") def test_should_have_height(self): self.assertEqual(self.file_metadata.height, 500) def test_should_have_width(self): self.assertEqual(self.file_metadata.width, 463) def test_should_have_codec(self): self.assertEqual(self.file_metadata.codec, "JPEG")
class FileParserTests(unittest.TestCase): def setUp(self): self.subject = FileParser() self.file_metadata = self.subject.parse("ddex/tests/resources/test.mp3") def test_should_have_duration(self): self.assertEqual(self.file_metadata.duration, "PT0M4.000S") def test_should_have_bitrate(self): self.assertEqual(self.file_metadata.bit_rate, 64) def test_should_have_codec(self): self.assertEqual(self.file_metadata.codec, "MP3")
class FileParserTests(unittest.TestCase): def setUp(self): self.subject = FileParser() self.file_metadata = self.subject.parse( "ddex/tests/resources/test.mp3") def test_should_have_duration(self): self.assertEqual(self.file_metadata.duration, "PT0M4.000S") def test_should_have_bitrate(self): self.assertEqual(self.file_metadata.bit_rate, 64) def test_should_have_codec(self): self.assertEqual(self.file_metadata.codec, "MP3")