Private
Public Access
1
0

a few more tests and removing old code

This commit is contained in:
Sander Roosendaal
2021-01-11 20:43:37 +01:00
parent e153e63481
commit 394d80d040
6 changed files with 47 additions and 487 deletions

View File

@@ -71,7 +71,10 @@ class InteractivePlotTests(TestCase):
self.assertFalse(len(script)==0)
self.assertFalse(len(div)==0)
def test_interactive_chart(self):
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.getsmallrowdata_db', side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart(self, mocked_sqlalchemy,
mocked_getsmallrowdata_db):
workout = Workout.objects.filter(user=self.r,workouttype__in=mytypes.rowtypes)[0]
id = workout.id
@@ -99,3 +102,14 @@ class InteractivePlotTests(TestCase):
script, div = interactiveplots.interactive_chart_video(data)
self.assertFalse(len(script)==0)
self.assertFalse(len(div)==0)
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.getsmallrowdata_db', side_effect=mocked_getsmallrowdata_db)
def test_interactive_flexchart_stacked(self, mocked_sqlalchemy,
mocked_getsmallrowdata_db):
workout = Workout.objects.filter(user=self.r,workouttype__in=mytypes.rowtypes)[0]
id = workout.id
script, div, js_res, css_res, comment = interactiveplots.interactive_flexchart_stacked(id,self.r)
self.assertFalse(len(script)==0)
self.assertFalse(len(div)==0)