mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-22 03:13:06 +00:00
updated as per pull request#19
This commit is contained in:
parent
3337817bf9
commit
ec50da1dcb
3 changed files with 7 additions and 15 deletions
|
@ -4,7 +4,7 @@ import os
|
|||
|
||||
PROJECT_ROOT = Path(__file__).ancestor(2)
|
||||
|
||||
DEBUG = True
|
||||
DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
|
|
|
@ -7,11 +7,7 @@ class HeaderTest(TestCase):
|
|||
|
||||
response = self.client.get(
|
||||
'/api/v1/pokemon/1/',
|
||||
HTTP_ORIGIN="http://anpeterse.me")
|
||||
HTTP_ORIGIN="http://anpeterse.me"
|
||||
)
|
||||
|
||||
print response.request
|
||||
print response.status_code
|
||||
print response
|
||||
print "checking for Access-Control-Allow-Origin header...";
|
||||
|
||||
self.assertEqual(response['Access-Control-Allow-Origin'], '*')
|
||||
self.assertEqual(response['Access-Control-Allow-Origin'], '*')
|
||||
|
|
|
@ -8,12 +8,8 @@ class HeaderTest(TestCase):
|
|||
def test_pokemon(self):
|
||||
|
||||
response = self.client.get(
|
||||
'/api/v1/pokemon/1/',
|
||||
HTTP_ORIGIN="http://anpeterse.me")
|
||||
'/api/v2/pokemon/1/',
|
||||
HTTP_ORIGIN="http://anpeterse.me"
|
||||
)
|
||||
|
||||
print response.request
|
||||
print response.status_code
|
||||
print response
|
||||
print "checking for Access-Control-Allow-Origin header...";
|
||||
|
||||
self.assertEqual(response['Access-Control-Allow-Origin'], '*')
|
||||
|
|
Loading…
Reference in a new issue