Beispiel #1
0
 def test_find_in_catalog_selected_catalog_not_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     catho.create_catalog(self.name + '_copy', self.path, 'sha1')
     items = catho.find_in_catalogs('not_existing_file.ext',
                                    (self.name, self.name + '_copy'))
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) == 0)
Beispiel #2
0
 def test_find_in_catalog_selected_catalog_not_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     catho.create_catalog(self.name + '_copy', self.path, 'sha1')
     items = catho.find_in_catalogs('not_existing_file.ext',
                                    (self.name, self.name + '_copy'))
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) == 0)
Beispiel #3
0
 def test_find_in_catalog_one_catalog_one_or_more_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     items = catho.find_in_catalogs('test_catalog.py', ('test', ))
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) > 0)
Beispiel #4
0
 def test_find_in_catalogs_all_catalogs_two_or_more_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     catho.create_catalog(self.name + '_copy', self.path, 'sha1')
     items = catho.find_in_catalogs('test_catalog.py')
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) > 1)
Beispiel #5
0
 def test_find_in_catalog_one_catalog_one_or_more_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     items = catho.find_in_catalogs('test_catalog.py', ('test',))
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) > 0)
Beispiel #6
0
 def test_find_in_catalogs_all_catalogs_two_or_more_matches(self):
     catho.create_catalog(self.name, self.path, 'sha1')
     catho.create_catalog(self.name + '_copy', self.path, 'sha1')
     items = catho.find_in_catalogs('test_catalog.py')
     items = [f for catalog, files in items.items() for f in files]
     self.assertTrue(len(items) > 1)