diff --git a/rowers/tests/test_fit_export.py b/rowers/tests/test_fit_export.py index cf9d8f01..695da58b 100644 --- a/rowers/tests/test_fit_export.py +++ b/rowers/tests/test_fit_export.py @@ -69,8 +69,9 @@ class FITExportLevel4Tests(TestCase): self.assertTrue(os.path.exists(fit_filename)) self.assertGreater(os.path.getsize(fit_filename), 0) - # Verify response structure - self.assertIsInstance(res, dict) + # exporttofit returns None in the normal case, and a dict only + # when there's something notable to report (see docstring) + self.assertTrue(res is None or isinstance(res, dict)) finally: if os.path.exists(fit_filename): @@ -321,8 +322,8 @@ class FITExportIntegrationTests(TestCase): email='test4@example.com', password='testpass123' ) - self.rower = Rower.objects.create(user=self.user) - + self.rower = Rower.objects.create(user=self.user, gdproptin=True, ftpset=True) + def test_export_view_creates_fit_file(self): """Test that the export view successfully creates a FIT file""" from django.test import Client diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz index bdb33837..9b93b634 100644 Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ