Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2020-11-04 18:28:55 +01:00
parent d0cf9c745e
commit a3a9b74f54

View File

@@ -18,6 +18,7 @@ class InteractiveChartTest(TestCase):
gdproptindate=timezone.now()
)
self.nu = datetime.datetime.now()
self.r = r
self.filename = 'rowers/tests/testdata/testdata.csv'
self.wotw = Workout.objects.create(name='testworkout',
@@ -75,14 +76,14 @@ class InteractiveChartTest(TestCase):
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
def test_interactive_chart5(self, mocked_sqlalchemy,mocked_read_df_sql):
res = iplots.interactive_flex_chart2(self.wote.id,promember=0,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,promember=0,
xparam='time',
yparam1='pace',yparam2='hr')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
def test_interactive_chart6(self, mocked_sqlalchemy,mocked_read_df_sql):
res = iplots.interactive_flex_chart2(self.wote.id,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=0,xparam='distance',
yparam1='pace',yparam2='hr')
@@ -91,49 +92,50 @@ class InteractiveChartTest(TestCase):
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart7(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,promember=0,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,promember=0,
xparam='time',
yparam1='pace',yparam2='spm')
yparam1='pace',yparam2='spm',mode='water')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart8(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=0,xparam='distance',
yparam1='pace',yparam2='spm')
yparam1='pace',yparam2='spm',mode='water')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart9(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=1,xparam='time',
yparam1='pace',yparam2='hr')
yparam1='pace',yparam2='hr',mode='water')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart10(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=1,xparam='distance',
yparam1='pace',yparam2='hr')
yparam1='pace',yparam2='hr',mode='water')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart11(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=1,xparam='time',
yparam1='pace',yparam2='spm')
yparam1='pace',yparam2='spm',mode='water')
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart12(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_flex_chart2(self.wote.id,promember=1,
res = iplots.interactive_flex_chart2(self.wote.id,self.r,
promember=1,
xparam='distance',
yparam1='pace',yparam2='spm')
yparam1='pace',yparam2='spm',mode='water')