Commit 6420673f authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

astakos: Use api_method_not_allowed in quota API

parent a7172a3c
......@@ -82,8 +82,7 @@ def commissions(request):
return get_pending_commissions(request)
elif method == 'POST':
return issue_commission(request)
raise BadRequest('Method not allowed.')
return api.api_method_not_allowed(request)
@api.api_method(http_method='GET', token_required=True, user_required=False)
......@@ -379,6 +379,10 @@ class QuotaAPITest(TestCase):
self.assertEqual(r11['usage'], 102)
self.assertEqual(r11['pending'], 101)
# Bad Request
r = client.head(u('commissions'))
self.assertEqual(r.status_code, 400)
class TokensApiTest(TestCase):
def setUp(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment