def METHOD_NAME(self):
    self.create_server()
    self.prepare_data()
    rv = self.client.post('/oauth/token', data={
        'grant_type': DeviceCodeGrant.GRANT_TYPE,
        'device_code': 'denied-code',
        'client_id': 'client',
    })
    resp = json.loads(rv.data)
    self.assertEqual(resp['error'], 'access_denied')