From 253b962c95b0c0239c11ce7c858af31487751948 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Mon, 28 Feb 2011 21:26:45 +0100 Subject: [PATCH] Add small test package hello_2.2-1_i386.deb. Signed-off-by: Torsten Werner --- tests/db_test.py | 6 ++---- tests/dbtest_packages.py | 5 +++-- .../ftp/pool/main/h/hello/hello_2.2-1_i386.deb | Bin 0 -> 1010 bytes 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 tests/fixtures/ftp/pool/main/h/hello/hello_2.2-1_i386.deb 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 0000000000000000000000000000000000000000..f40802b8bea915339779e689516c1cc87a3b103b GIT binary patch literal 1010 zcmY$iNi0gvu;WTeP0CEn(@o0EODw8XP*5;5vb3-?GBGeTQBW`d@?oT*fq|I`Pz;Em zAc4zB&wwjAKd+=HKS!@5u}Ckyim-lDb5po}`ECvd5MW|{dnqvcwt)acg8l38JJHb| zZ!9`5CvDs0nE3jzn?m&b@BhZ9y$)sJe)qro_Nhm4*Je03M@1L5pVQ7Ria2(gTWWc{{QqTzvyQ&z{=t}a%RYSBrX=^7 zGMlwOHbmvj-Q?HWE|X(!H$7_4cHOeel};}{sYtdduJg55n_Lmy>S*QDm+q^-qjlQ7)l6CK5>r;DEBJB>Wo3IG$lvtVr0emia(R1y(dKhEZ=EcYIla%p|Frf^ zt+h*LJ3bYe8)E;bOM>|h8)J!*b%nvTGxFcJhg5KgRrQNJoZ^vqdmaCa1L7hp9HJ6U zd3v>^7@Oaga+;aEU~|3wjbrabc2C_KuM0IVgh+EQ$Zii=eeZRYEj624`NK#wV}sxH z^yOBZ7WT{R*@6x(UN=uIAo6?qg6;^H9>Zf2$!NrzNP9-9J0GGMG#D7TQW8rN;Rz3z zstBcBBNIbxY43V8*C7Le)`vPvwGF19^ttwUX~e=UlfsVNo!!x-zov^@OV(o8h z&e)8vrD~jKDz`SC{adwoP3odA2M%f_ul*Wlx`xZb=d+Pn@2vh@nOi?T>`nh&pS6%b z_{#nZ_je~SMH=m_7ij+X^w;{b=6_57^>O~?{{H^fKKa%2|2s|kC0rfY>-gX4@A5p! z=-Bdq>;E2o{?AS3+5VFMXLnrt`YZl?y?9Z*qT7F|zxvx7)>-_26I3sMDZSy})nDt6 p|J8iA?e3qA|0dPFh2kWCLMT@eBfEdVDOx9R`@ literal 0 HcmV?d00001 -- 2.39.5