comparison test/test_info_data.py @ 507:c8268d40d35d

fix test after changes to cachedb.get_old_packages
author Bjoern Ricks <bricks@intevation.de>
date Mon, 08 Nov 2010 16:40:19 +0000
parents 4980f8d5014a
children
comparison
equal deleted inserted replaced
506:3a5dd6f98f71 507:c8268d40d35d
49 self.assertEquals(package.name, package2.name) 49 self.assertEquals(package.name, package2.name)
50 self.assertEquals(package.sourcepath, package2.sourcepath) 50 self.assertEquals(package.sourcepath, package2.sourcepath)
51 self.assertEquals(package.arch, package2.arch) 51 self.assertEquals(package.arch, package2.arch)
52 self.assertEquals(package.md5sum, package2.md5sum) 52 self.assertEquals(package.md5sum, package2.md5sum)
53 53
54 package3 = Package("/tmp/foo/foo_0.2.i386.deb", "foo", 54 package3 = Package("/tmp/foo/foo_0.2.i386.deb", "abc",
55 "foo_0.2_i386.deb", "/tmp/source/foo/foo_0.2.i386.deb", 55 "foo_0.2_i386.deb", "/tmp/source/foo/foo_0.2.i386.deb",
56 "binary-i386", "987654321") 56 "binary-i386", "987654321")
57 package4 = Package("/tmp/john/doe_0.3.i386.deb", "john", 57 package4 = Package("/tmp/john/doe_0.3.i386.deb", "abc",
58 "doe_0.3.i386.deb", "/tmp/source/john/doe_0.3.i386.deb", 58 "doe_0.3.i386.deb", "/tmp/source/john/doe_0.3.i386.deb",
59 "binary-i386", "5671234") 59 "binary-i386", "5671234")
60 db.add_package(package3) 60 db.add_package(package3)
61 db.add_package(package4) 61 db.add_package(package4)
62 62
63 # test get_old_packages 63 # test get_old_packages
64 oldpackages = db.get_old_packages([package.filename]) 64 oldpackages = db.get_old_packages([package])
65 self.assertEquals(2, len(oldpackages)) 65 self.assertEquals(2, len(oldpackages))
66 packages = db.get_packages() 66 packages = db.get_packages()
67 self.assertEquals(3, len(packages)) 67 self.assertEquals(3, len(packages))
68 db.remove_packages(oldpackages) 68 db.remove_packages(oldpackages)
69 packages = db.get_packages() 69 packages = db.get_packages()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)