forked from stravalib/stravalib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…nctional test for laps (only will work for me)
- Loading branch information
Showing
6 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ dist/ | |
*.egg-info/ | ||
*.egg/ | ||
docs/_build/ | ||
test.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
import warnings | ||
import os | ||
import ConfigParser | ||
|
||
from stravalib import model | ||
from stravalib.client import Client | ||
|
||
from stravalib.tests import TestBase | ||
|
||
# This is the access token from the Strava examples :) | ||
TEST_ACCESS_TOKEN = "83ebeabdec09f6670863766f792ead24d61fe3f9" | ||
from stravalib.tests import TestBase, TESTS_DIR, RESOURCES_DIR | ||
|
||
TEST_CFG = os.path.join(TESTS_DIR, 'test.ini') | ||
|
||
class FunctionalTestBase(TestBase): | ||
|
||
def setUp(self): | ||
super(FunctionalTestBase, self).setUp() | ||
self.client = Client(access_token=TEST_ACCESS_TOKEN) | ||
if not os.path.exists(TEST_CFG): | ||
raise Exception("Unable to run the write tests without a tests.ini that defines an access_token with write privs.") | ||
|
||
cfg = ConfigParser.SafeConfigParser() | ||
with open(TEST_CFG) as fp: | ||
cfg.readfp(fp, 'test.ini') | ||
access_token = cfg.get('write_tests', 'access_token') | ||
|
||
self.client = Client(access_token=access_token) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters