increase test coverage
This commit is contained in:
@@ -385,39 +385,6 @@ class C2Objects(DjangoTestCase):
|
||||
|
||||
|
||||
|
||||
@patch('rowers.dataprep.create_engine')
|
||||
def test_strokedata(self, mocked_sqlalchemy):
|
||||
with open('rowers/tests/testdata/c2stroketestdata.txt','r') as infile:
|
||||
res = json.load(infile)
|
||||
|
||||
strokedata = pd.DataFrame.from_dict(res['data'])
|
||||
|
||||
with open('rowers/tests/testdata/c2testdata.txt','r') as infile:
|
||||
res = json.load(infile)
|
||||
|
||||
data = res['data']
|
||||
|
||||
from rowers.views import add_workout_from_strokedata
|
||||
|
||||
res = add_workout_from_strokedata(self.u,1,data,strokedata,source='c2')
|
||||
|
||||
@patch('rowers.dataprep.create_engine')
|
||||
def test_strokedatanohr(self, mocked_sqlalchemy):
|
||||
with open('rowers/tests/testdata/c2strokedatanohr.txt','r') as infile:
|
||||
res = json.load(infile)
|
||||
|
||||
strokedata = pd.DataFrame.from_dict(res['data'])
|
||||
|
||||
with open('rowers/tests/testdata/c2testdata.txt','r') as infile:
|
||||
res = json.load(infile)
|
||||
|
||||
data = res['data']
|
||||
|
||||
from rowers.views import add_workout_from_strokedata
|
||||
|
||||
|
||||
res = add_workout_from_strokedata(self.u,1,data,strokedata,source='c2')
|
||||
|
||||
@patch('rowers.tasks.requests.get',side_effect=mocked_requests)
|
||||
@patch('rowers.tasks.requests.post',side_effect=mocked_requests)
|
||||
@patch('rowers.tasks.requests.session', side_effect=mocked_requests)
|
||||
|
||||
Reference in New Issue
Block a user