From: Torsten Werner Date: Mon, 28 Feb 2011 20:26:45 +0000 (+0100) Subject: Add small test package hello_2.2-1_i386.deb. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=253b962c95b0c0239c11ce7c858af31487751948;p=dak.git Add small test package hello_2.2-1_i386.deb. Signed-off-by: Torsten Werner --- diff --git a/tests/db_test.py b/tests/db_test.py index 4f5e6382..9ae23017 100644 --- a/tests/db_test.py +++ b/tests/db_test.py @@ -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): diff --git a/tests/dbtest_packages.py b/tests/dbtest_packages.py index 32c1b8c5..2b179053 100755 --- a/tests/dbtest_packages.py +++ b/tests/dbtest_packages.py @@ -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 index 00000000..f40802b8 Binary files /dev/null and b/tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb differ