tests: Match the correct files in filter tests
authorGuido Günther <agx@sigxcpu.org>
Mon, 1 Mar 2021 13:57:43 +0000 (14:57 +0100)
committerGuido Günther <agx@sigxcpu.org>
Mon, 1 Mar 2021 14:06:10 +0000 (15:06 +0100)
Verify we match at all by adding a positive test as well

tests/component/deb/test_import_orig.py

index de1aa2e623385d552bcdf721ce8533f6b3a226d8..9581f5decb47876a5d753a96bfd80983b6c3e2aa 100644 (file)
@@ -258,7 +258,8 @@ class TestImportOrig(ComponentTestBase):
                                tags=['debian/2.6-2', 'upstream/2.6', 'upstream/2.8'])
         self._check_component_tarballs(repo, ['foo/test1', 'foo/test2'])
 
-        ok_('README' not in repo.ls_tree('HEAD'),
+        ok_(b'COPYING' in repo.ls_tree('HEAD'))
+        ok_(b'README' not in repo.ls_tree('HEAD'),
             "README not filtered out of %s" % repo.ls_tree('HEAD'))
         tar = '../hello-debhelper_2.8.orig.tar.gz'
 
@@ -299,9 +300,10 @@ class TestImportOrig(ComponentTestBase):
                                tags=['debian/2.6-2', 'upstream/2.6', 'upstream/2.8'])
         self._check_component_tarballs(repo, ['foo/test1', 'foo/test2'])
 
-        ok_('README' not in repo.ls_tree('HEAD'),
+        ok_(b'COPYING' in repo.ls_tree('HEAD'))
+        ok_(b'README' not in repo.ls_tree('HEAD'),
             "README not filtered out of %s" % repo.ls_tree('HEAD'))
-        ok_('TODO' not in repo.ls_tree('HEAD'),
+        ok_(b'TODO' not in repo.ls_tree('HEAD'),
             "TODO not filtered out of %s" % repo.ls_tree('HEAD'))
         tar = '../hello-debhelper_2.8.orig.tar.gz'