fixed tox, update to included linters
This commit is contained in:
@@ -1,37 +1,35 @@
|
||||
from athleticotogo.athletico import Athletico
|
||||
import unittest
|
||||
import vcr
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import vcr
|
||||
|
||||
from athletico.athletico import Athletico
|
||||
|
||||
|
||||
class TestAthletico(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls) -> None:
|
||||
with open('tests/data/input/sample_data.json') as f:
|
||||
cls.tokens = json.load(f)['tokens']
|
||||
|
||||
def setUp(self):
|
||||
os.chdir("..")
|
||||
pass
|
||||
with open("tests/data/input/sample_data.json") as f:
|
||||
cls.tokens = json.load(f)["tokens"]
|
||||
|
||||
@vcr.use_cassette(cassette_library_dir="tests/fixtures")
|
||||
def test_extract(self):
|
||||
a = Athletico()
|
||||
episodes = a.fetch_episodes_for_access_code(self.tokens[0])
|
||||
self.assertIn('id', episodes[0])
|
||||
self.assertIn('program', episodes[0])
|
||||
self.assertIn('program_exercises', episodes[0]['program'])
|
||||
self.assertIn("id", episodes[0])
|
||||
self.assertIn("program", episodes[0])
|
||||
self.assertIn("program_exercises", episodes[0]["program"])
|
||||
|
||||
@vcr.use_cassette(cassette_library_dir="tests/fixtures")
|
||||
def test_save_extraction_to_local(self):
|
||||
a = Athletico()
|
||||
print(os.path.abspath(os.path.curdir))
|
||||
for token in self.tokens:
|
||||
episodes = a.fetch_episodes_for_access_code(token)
|
||||
a.save_episodes(episodes, destination='tests/data/output')
|
||||
a.save_episodes(episodes, destination="tests/data/output")
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user