adding interactive plot to tests
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
2
rowers/tests/testdata/testdata.tcx
vendored
2
rowers/tests/testdata/testdata.tcx
vendored
@@ -2502,7 +2502,7 @@
|
||||
</Trackpoint>
|
||||
</Track>
|
||||
</Lap>
|
||||
<Notes><Element 'Notes' at 0x14e07da0></Notes>
|
||||
<Notes><Element 'Notes' at 0x13f289b0></Notes>
|
||||
</Activity>
|
||||
</Activities>
|
||||
<Creator>
|
||||
|
||||
Reference in New Issue
Block a user