Private
Public Access
1
0

adding interactive plot to tests

This commit is contained in:
Sander Roosendaal
2019-01-14 11:15:31 +01:00
parent c3f26aece9
commit 7e977ab659
5 changed files with 12 additions and 4 deletions

View File

@@ -88,12 +88,16 @@ class InteractiveChartTest(TestCase):
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
def test_interactive_chart1(self, mocked_sqlalchemy,mocked_read_df_sql):
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_interactive_chart1(self, mocked_sqlalchemy,mocked_read_df_sql,
mocked_getsmallrowdata_db):
res = iplots.interactive_chart(self.wote.id)
@patch('rowers.dataprep.create_engine')
@patch('rowers.dataprep.read_df_sql')
def test_interactive_chart2(self, mocked_sqlalchemy,mocked_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):
res = iplots.interactive_chart(self.wote.id,promember=1)
@patch('rowers.dataprep.create_engine')

View File

@@ -23,6 +23,9 @@ workoutstarttime = row.rowdatetime.strftime('%H:%M:%S')
from rowers.teams import *
# add following tests:
# - when member leaves team, his name should be removed from planned sessions
class UserFactory(factory.DjangoModelFactory):
class Meta:
model = User

View File

@@ -71,7 +71,8 @@ class ViewTest(TestCase):
self.assertEqual(response.status_code, 200)
@patch('rowers.dataprep.create_engine')
def test_upload_view_sled(self, mocked_sqlalchemy):
@patch('rowers.dataprep.getsmallrowdata_db',side_effect=mocked_getsmallrowdata_db)
def test_upload_view_sled(self, mocked_sqlalchemy,mocked_getsmallrowdata_db):
login = self.c.login(username='john',password='koeinsloot')
self.assertTrue(login)

Binary file not shown.

View File

@@ -2502,7 +2502,7 @@
</Trackpoint>
</Track>
</Lap>
<Notes>&lt;Element 'Notes' at 0x14e07da0&gt;</Notes>
<Notes>&lt;Element 'Notes' at 0x13f289b0&gt;</Notes>
</Activity>
</Activities>
<Creator>