Commit 1a3e459bfb9c8afa1b03e3210436e3c2582f8ff3
1 parent
129a6d7b1b
Exists in
master
Switched to local.flashy.cards cause chrome sux
Showing 2 changed files with 3 additions and 6 deletions Side-by-side Diff
flashcards/tests/test_api.py
View file @
1a3e459
... | ... | @@ -76,13 +76,10 @@ |
76 | 76 | self.assertIn(user.confirmation_key, mail.outbox[0].body) |
77 | 77 | |
78 | 78 | # log the user out |
79 | - response = self.client.post('/api/logout', format='json') | |
80 | - self.assertEqual(response.status_code, 204) | |
79 | + self.client.logout() | |
81 | 80 | |
82 | 81 | # log the user in with their registered credentials |
83 | - data = {'email': 'none@none.com', 'password': '1234'} | |
84 | - response = self.client.post('/api/login', data, format='json') | |
85 | - self.assertEqual(response.status_code, HTTP_200_OK) | |
82 | + self.client.login(email='none@none.com', password='1234') | |
86 | 83 | |
87 | 84 | # try activating with an invalid key |
88 | 85 | response = self.client.patch(url, {'confirmation_key': 'NOT A KEY'}) |
nginxconf/flashy.cards
View file @
1a3e459
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | } |
23 | 23 | |
24 | 24 | location ~ /(api|admin|api-auth)/ { |
25 | - add_header 'Access-Control-Allow-Origin' 'http://localhost/'; | |
25 | + add_header 'Access-Control-Allow-Origin' 'http://local.flashy.cards/'; | |
26 | 26 | add_header 'Access-Control-Allow-Credentials' 'true'; |
27 | 27 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PATCH, PUT'; |
28 | 28 | proxy_pass http://backend_production; |