def test_list(self): with helpers.pool_entries(self.controller, 10) as expect: values = zip(self.controller.list(u'_'), expect) for e, x in values: p, q, s = x self._check_structure(e) self._check_value(e, xqueue=q, xproject=p, xpool=s)
def test_catalogue_entry_life_cycle(self): queue = self.queue project = self.project # check listing is initially empty for p in self.controller.list(project): self.fail('There should be no entries at this time') # create a listing, check its length with helpers.pool_entries(self.controller, 10) as expect: project = expect[0][0] xs = list(self.controller.list(project)) self.assertEqual(len(xs), 10) # create, check existence, delete with helpers.pool_entry(self.controller, project, queue, u'a'): self.assertTrue(self.controller.exists(project, queue)) # verify it no longer exists self.assertFalse(self.controller.exists(project, queue)) # verify it isn't listable self.assertEqual(len(list(self.controller.list(project))), 0)