def test_list(self): with helpers.entries(self.controller, 10) as expect: values = zip(self.controller.list(u'_'), expect) for e, x in values: p, q, n, h = x self._check_structure(e) self._check_value(e, xname=q, xmeta={}, xpartition=n, xhost=h)
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.entries(self.controller, 10): xs = list(self.controller.list(u'_')) self.assertEqual(len(xs), 10) # create, check existence, delete with helpers.entry(self.controller, project, queue, u'a', 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)