pokeapi/pokemon/tests.py
2016-03-05 11:40:41 +00:00

14 lines
326 B
Python
Executable file

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/',
HTTP_ORIGIN="http://pokemon.com"
)
self.assertEqual(response['Access-Control-Allow-Origin'], '*')