committing survey
This commit is contained in:
@@ -14,7 +14,7 @@ class InteractiveChartTest(TestCase):
|
||||
u = User.objects.create_user('john',
|
||||
'sander@ds.ds',
|
||||
'koeinsloot')
|
||||
r = Rower.objects.create(user=u,gdproptin=True,
|
||||
r = Rower.objects.create(user=u,gdproptin=True,surveydone=True,
|
||||
gdproptindate=timezone.now()
|
||||
)
|
||||
self.nu = datetime.datetime.now()
|
||||
@@ -26,7 +26,7 @@ class InteractiveChartTest(TestCase):
|
||||
starttime=self.nu.strftime('%H:%M:%S'),
|
||||
duration="0:55:00",distance=8000,
|
||||
csvfilename=self.filename)
|
||||
|
||||
|
||||
self.wote = Workout.objects.create(name='testworkout',
|
||||
workouttype='Indoor Rower',
|
||||
user=r,date=self.nu.strftime('%Y-%m-%d'),
|
||||
@@ -40,7 +40,7 @@ class InteractiveChartTest(TestCase):
|
||||
def test_painsled(self, mocked_sqlalchemy, mocked_read_df_sql):
|
||||
u = User.objects.get(username='john')
|
||||
r = Rower.objects.get(user=u)
|
||||
|
||||
|
||||
rr = rrower(hrmax=r.max,hrut2=r.ut2,
|
||||
hrut1=r.ut1,hrat=r.at,
|
||||
hrtr=r.tr,hran=r.an,ftp=r.ftp)
|
||||
@@ -59,7 +59,7 @@ class InteractiveChartTest(TestCase):
|
||||
@patch('rowers.dataprep.read_df_sql')
|
||||
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
|
||||
def test_interactive_chart2(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_chart(self.wote.id,promember=1)
|
||||
|
||||
@patch('rowers.dataprep.create_engine')
|
||||
@@ -69,7 +69,7 @@ class InteractiveChartTest(TestCase):
|
||||
|
||||
@patch('rowers.dataprep.create_engine')
|
||||
@patch('rowers.dataprep.read_df_sql')
|
||||
def test_interactive_chart4(self, mocked_sqlalchemy,mocked_read_df_sql):
|
||||
def test_interactive_chart4(self, mocked_sqlalchemy,mocked_read_df_sql):
|
||||
res = iplots.interactive_bar_chart(self.wote.id,promember=1)
|
||||
|
||||
@patch('rowers.dataprep.create_engine')
|
||||
@@ -90,7 +90,7 @@ class InteractiveChartTest(TestCase):
|
||||
@patch('rowers.dataprep.read_df_sql')
|
||||
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
|
||||
def test_interactive_chart7(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,promember=0,
|
||||
xparam='time',
|
||||
yparam1='pace',yparam2='spm')
|
||||
@@ -98,8 +98,8 @@ class InteractiveChartTest(TestCase):
|
||||
@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):
|
||||
def test_interactive_chart8(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,
|
||||
promember=0,xparam='distance',
|
||||
yparam1='pace',yparam2='spm')
|
||||
@@ -108,23 +108,23 @@ class InteractiveChartTest(TestCase):
|
||||
@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):
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,
|
||||
promember=1,xparam='time',
|
||||
yparam1='pace',yparam2='hr')
|
||||
@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):
|
||||
def test_interactive_chart10(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,
|
||||
promember=1,xparam='distance',
|
||||
yparam1='pace',yparam2='hr')
|
||||
@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):
|
||||
def test_interactive_chart11(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,
|
||||
promember=1,xparam='time',
|
||||
yparam1='pace',yparam2='spm')
|
||||
@@ -132,10 +132,8 @@ class InteractiveChartTest(TestCase):
|
||||
@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):
|
||||
def test_interactive_chart12(self, mocked_sqlalchemy,mocked_read_df_sql,
|
||||
mocked_getsmallrowdata_db):
|
||||
res = iplots.interactive_flex_chart2(self.wote.id,promember=1,
|
||||
xparam='distance',
|
||||
yparam1='pace',yparam2='spm')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user