def test_two(self): file_a1 = File("a.txt", [FileVersion("a", "a", 100, "upload", 10)]) file_a2 = File("b.txt", [FileVersion("b", "b", 100, "upload", 10)]) file_a3 = File("d.txt", [FileVersion("c", "c", 100, "upload", 10)]) file_a4 = File("f.txt", [FileVersion("f", "f", 100, "upload", 10)]) file_b1 = File("b.txt", [FileVersion("b", "b", 200, "upload", 10)]) file_b2 = File("e.txt", [FileVersion("e", "e", 200, "upload", 10)]) folder_a = FakeFolder('b2', [file_a1, file_a2, file_a3, file_a4]) folder_b = FakeFolder('b2', [file_b1, file_b2]) self.assertEqual([(file_a1, None), (file_a2, file_b1), (file_a3, None), (None, file_b2), (file_a4, None)], list(zip_folders(folder_a, folder_b)))
def test_two(self): file_a1 = File("a.txt", [FileVersion("a", 100, "upload")]) file_a2 = File("b.txt", [FileVersion("b", 100, "upload")]) file_a3 = File("d.txt", [FileVersion("c", 100, "upload")]) file_a4 = File("f.txt", [FileVersion("f", 100, "upload")]) file_b1 = File("b.txt", [FileVersion("b", 200, "upload")]) file_b2 = File("e.txt", [FileVersion("e", 200, "upload")]) folder_a = FakeFolder('b2', [file_a1, file_a2, file_a3, file_a4]) folder_b = FakeFolder('b2', [file_b1, file_b2]) self.assertEqual( [ (file_a1, None), (file_a2, file_b1), (file_a3, None), (None, file_b2), (file_a4, None) ], list(zip_folders(folder_a, folder_b)) )
def test_one_empty(self): file_a1 = File("a.txt", [FileVersion("a", 100, "upload")]) folder_a = FakeFolder('b2', [file_a1]) folder_b = FakeFolder('b2', []) self.assertEqual([(file_a1, None)], list(zip_folders(folder_a, folder_b)))
def test_empty(self): folder_a = FakeFolder('b2', []) folder_b = FakeFolder('b2', []) self.assertEqual([], list(zip_folders(folder_a, folder_b)))
def test_one_empty(self): file_a1 = File("a.txt", [FileVersion("a", "a", 100, "upload", 10)]) folder_a = FakeFolder('b2', [file_a1]) folder_b = FakeFolder('b2', []) self.assertEqual([(file_a1, None)], list(zip_folders(folder_a, folder_b)))