def test_01_update_consumer(self): # update causes private key loss; do not change self.consumer consumer = self.consumer | { 'display_name': "A %s consumer" % type(self).__name__ } with self.pulp.asserting(True): consumer.delta_update(self.pulp) self.assertEqual(Consumer.get(self.pulp, consumer.id), consumer)
def test_04_check_binding_present(self): consumer = Consumer.get(self.pulp, self.consumer.id, params={"bindings": True}) self.assertTrue(consumer.data["bindings"] != [])
def test_07_get_nonesistant_consumer_info(self): with self.assertRaises(AssertionError): Consumer.get(self.pulp, 'some_consumer') self.assertPulp(code=404)
def test_07_get_consumer_info(self): consumer = Consumer.get(self.pulp, self.consumer.id) self.assertEqual(consumer.id, self.consumer.id)
def test_01_update_consumer(self): # update causes private key loss; do not change self.consumer consumer = self.consumer | {'display_name': "A %s consumer" % type(self).__name__} with self.pulp.asserting(True): consumer.delta_update(self.pulp) self.assertEqual(Consumer.get(self.pulp, consumer.id), consumer)
def test_08_get_list_consumers(self): self.assertIn(Consumer.get(self.pulp, self.consumer.id), Consumer.list(self.pulp))