'Tests the delete function.'

@decorators.idempotent_id('fdfa1b7f-2a31-4354-b2c7-f6ae20554f93')
def test_delete_consumer(self):

    consumer = self._create_consumer()
    fetched_consumer = self.oauth_consumers_client.show_consumer(consumer['id'])['consumer']
    self.assertEqual(consumer['id'], fetched_consumer['id'])
    self.oauth_consumers_client.delete_consumer(consumer['id'])
    self.assertRaises(exceptions.NotFound, self.oauth_consumers_client.show_consumer, consumer['id'])
