mirror of
https://github.com/wger-project/wger.git
synced 2026-02-18 00:17:51 +01:00
Fix fitbit tests ref=[#137599137]
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.core.urlresolvers import reverse
|
||||
from wger.core.tests.base_testcase import WorkoutManagerTestCase
|
||||
from django.conf import settings
|
||||
import requests
|
||||
import json
|
||||
|
||||
@@ -7,11 +8,15 @@ import json
|
||||
class SyncWithFitbitTestCase(WorkoutManagerTestCase):
|
||||
|
||||
def test_it_shows_instructions(self):
|
||||
settings.WGER_SETTINGS['FITBIT_CLIENT_ID'] = '2283MF'
|
||||
settings.WGER_SETTINGS['FITBIT_CLIENT_SECRET'] = 'thisisaclientsecret'
|
||||
self.user_login()
|
||||
r = self.client.get(reverse('core:user:fitbit'))
|
||||
self.assertContains(r, "https://www.fitbit.com/oauth2/authorize", status_code=200)
|
||||
|
||||
def test_it_handles_oauth_response(self):
|
||||
settings.WGER_SETTINGS['FITBIT_CLIENT_ID'] = '2283MF'
|
||||
settings.WGER_SETTINGS['FITBIT_CLIENT_SECRET'] = 'thisisaclientsecret'
|
||||
oauth_response = {"access_token": "test-token"}
|
||||
|
||||
url = reverse('core:user:fitbit')
|
||||
|
||||
Reference in New Issue
Block a user