def test_create_from_file_obj(self): listing = FileListing.from_file(open(EXAMPLE_PATH, 'r')) self._test_example_listing(listing)
def test_round_trip_compares_equal(self): listing_a = FileListing.from_file(EXAMPLE_PATH) a_serialized = listing_a.serialize() listing_b = FileListing.from_string(a_serialized) self.assertEquals(listing_a, listing_b)
def test_create_from_filename(self): listing = FileListing.from_file(EXAMPLE_PATH) self._test_example_listing(listing)