pokeapi/pokemon/tests.py

15 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:56:21 +00:00
HTTP_ORIGIN="http://pokemon.com"
2014-12-07 16:32:09 +00:00
)
2014-12-07 16:32:09 +00:00
self.assertEqual(response['Access-Control-Allow-Origin'], '*')
2014-12-07 16:38:15 +00:00