]> git.decadent.org.uk Git - dak.git/commitdiff
Add small test package hello_2.2-1_i386.deb.
authorTorsten Werner <twerner@debian.org>
Mon, 28 Feb 2011 20:26:45 +0000 (21:26 +0100)
committerTorsten Werner <twerner@debian.org>
Mon, 28 Feb 2011 20:28:36 +0000 (21:28 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
tests/db_test.py
tests/dbtest_packages.py
tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb [new file with mode: 0644]

index 4f5e63822ac4eab534ffb0b428af705a5f0ddfcf..9ae23017be550ce74ee0bdfc0f36c2d034375ff0 100644 (file)
@@ -113,11 +113,9 @@ class DBDakTestCase(DakTestCase):
         self.setup_components()
         self.loc = {}
         self.loc['main'] = Location( \
-            path = '/srv/ftp-master.debian.org/ftp/pool/', \
-            component = self.comp['main'])
+            path = fixture('ftp/pool/'), component = self.comp['main'])
         self.loc['contrib'] = Location( \
-            path = '/srv/ftp-master.debian.org/ftp/pool/', \
-            component = self.comp['contrib'])
+            path = fixture('ftp/pool/'), component = self.comp['contrib'])
         self.session.add_all(self.loc.values())
 
     def setup_poolfiles(self):
index 32c1b8c5c72a9fb3428e32c289261e860e327115..2b17905305c8df7314df27207ddd9e5f2175216c 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
 from db_test import DBDakTestCase
+from base_test import fixture
 
 from daklib.dbconn import *
 from daklib.queue_install import package_to_suite
@@ -84,7 +85,7 @@ class PackageTestCase(DBDakTestCase):
 
         main = self.loc['main']
         contrib = self.loc['contrib']
-        self.assertEqual('/srv/ftp-master.debian.org/ftp/pool/', main.path)
+        self.assertEqual(fixture('ftp/pool/'), main.path)
         count = len(self.file.keys()) - 2
         self.assertEqual(count, main.files.count())
         self.assertEqual(2, contrib.files.count())
@@ -103,7 +104,7 @@ class PackageTestCase(DBDakTestCase):
         self.assertEqual(count - 1, main.files.count())
         self.assertEqual(3, contrib.files.count())
         # test fullpath
-        self.assertEqual('/srv/ftp-master.debian.org/ftp/pool/main/s/sl/sl_3.03-16.dsc', \
+        self.assertEqual(fixture('ftp/pool/main/s/sl/sl_3.03-16.dsc'), \
             self.file['sl_3.03-16.dsc'].fullpath)
         # test check_poolfile()
         self.assertEqual((True, self.file['sl_3.03-16.dsc']), \
diff --git a/tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb b/tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb
new file mode 100644 (file)
index 0000000..f40802b
Binary files /dev/null and b/tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb differ