pokeapi/pokemon_v1/tests.py

14 lines
308 B
Python
Raw Normal View History

2014-12-04 11:11:46 +00:00
from __future__ import unicode_literals
from django.test import TestCase
class HeaderTest(TestCase):
def test_pokemon(self):
response = self.client.get(
'/api/v1/pokemon/1/',
2014-12-07 16:32:09 +00:00
HTTP_ORIGIN="http://anpeterse.me"
)
2014-12-07 16:32:09 +00:00
self.assertEqual(response['Access-Control-Allow-Origin'], '*')