fixes
This commit is contained in:
@@ -210,6 +210,24 @@ class OwnApi(TestCase):
|
||||
response = strokedata_tcx(request)
|
||||
self.assertEqual(response.status_code,200)
|
||||
|
||||
def test_strokedataform_empty(self):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
self.assertTrue(login)
|
||||
|
||||
w = self.user_workouts[1]
|
||||
|
||||
url = reverse('strokedata_tcx')
|
||||
|
||||
request = self.factory.post(url, data = '', content_type='application/xml')
|
||||
request.user = self.u
|
||||
request.content_type = 'application/xml'
|
||||
|
||||
force_authenticate(request, user=self.u)
|
||||
with patch('rowers.dataprep.getrowdata_db') as mock_getrowdata:
|
||||
mock_getrowdata.return_value = (pd.DataFrame(),None)
|
||||
response = strokedata_tcx(request)
|
||||
self.assertEqual(response.status_code,405)
|
||||
|
||||
|
||||
def test_strokedataform_v3(self):
|
||||
login = self.c.login(username=self.u.username, password=self.password)
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user