diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py b/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py index f97a869d..67198c18 100644 --- a/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py +++ b/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py @@ -41,7 +41,7 @@ def test_add_an_activity_gpx(app): assert 1 == data['data']['activities'][0]['user_id'] assert 1 == data['data']['activities'][0]['sport_id'] assert '0:04:10' == data['data']['activities'][0]['duration'] - assert 'cycling - 2018-03-13 12:44:45' == data['data']['activities'][0]['title'] # noqa + assert 'just an activity' == data['data']['activities'][0]['title'] assert data['data']['activities'][0]['ascent'] == 0.4 assert data['data']['activities'][0]['ave_speed'] == 4.6 assert data['data']['activities'][0]['descent'] == 23.4 @@ -99,7 +99,7 @@ def test_get_an_activity_with_gpx(app): assert 1 == data['data']['activities'][0]['user_id'] assert 1 == data['data']['activities'][0]['sport_id'] assert '0:04:10' == data['data']['activities'][0]['duration'] - assert 'cycling - 2018-03-13 12:44:45' == data['data']['activities'][0]['title'] # noqa + assert 'just an activity' == data['data']['activities'][0]['title'] assert data['data']['activities'][0]['ascent'] == 0.4 assert data['data']['activities'][0]['ave_speed'] == 4.6 assert data['data']['activities'][0]['descent'] == 23.4 diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py b/mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py index d18f56fe..3e0be5b5 100644 --- a/mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py +++ b/mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py @@ -122,7 +122,7 @@ def test_edit_an_activity_with_gpx_partial(app): assert 1 == data['data']['activities'][0]['user_id'] assert 2 == data['data']['activities'][0]['sport_id'] assert '0:04:10' == data['data']['activities'][0]['duration'] - assert data['data']['activities'][0]['title'] == 'cycling - 2018-03-13 12:44:45' # noqa + assert data['data']['activities'][0]['title'] == 'just an activity' assert data['data']['activities'][0]['ascent'] == 0.4 assert data['data']['activities'][0]['ave_speed'] == 4.6 assert data['data']['activities'][0]['descent'] == 23.4 diff --git a/mpwo_api/mpwo_api/tests/utils_gpx.py b/mpwo_api/mpwo_api/tests/utils_gpx.py index 229db78a..0e75f3c2 100644 --- a/mpwo_api/mpwo_api/tests/utils_gpx.py +++ b/mpwo_api/mpwo_api/tests/utils_gpx.py @@ -1,4 +1,116 @@ gpx_file = ( + '' + '' # noqa + ' ' + ' ' + ' just an activity' + ' ' + ' ' + ' 998' + ' ' + ' ' + ' ' + ' 998' + ' ' + ' ' + ' ' + ' 994' + ' ' + ' ' + ' ' + ' 994' + ' ' + ' ' + ' ' + ' 994' + ' ' + ' ' + ' ' + ' 993' + ' ' + ' ' + ' ' + ' 992' + ' ' + ' ' + ' ' + ' 992' + ' ' + ' ' + ' ' + ' 987' + ' ' + ' ' + ' ' + ' 987' + ' ' + ' ' + ' ' + ' 987' + ' ' + ' ' + ' ' + ' 987' + ' ' + ' ' + ' ' + ' 986' + ' ' + ' ' + ' ' + ' 986' + ' ' + ' ' + ' ' + ' 986' + ' ' + ' ' + ' ' + ' 985' + ' ' + ' ' + ' ' + ' 980' + ' ' + ' ' + ' ' + ' 980' + ' ' + ' ' + ' ' + ' 980' + ' ' + ' ' + ' ' + ' 979' + ' ' + ' ' + ' ' + ' 981' + ' ' + ' ' + ' ' + ' 980' + ' ' + ' ' + ' ' + ' 979' + ' ' + ' ' + ' ' + ' 979' + ' ' + ' ' + ' ' + ' 975' + ' ' + ' ' + ' ' + ' ' + '' +) + +gpx_file_wo_name = ( '' '' # noqa ' ' @@ -108,3 +220,12 @@ gpx_file = ( ' ' '' ) + +gpx_file_wo_track = ( + '' + '' # noqa + ' ' + '' +) + +gpx_file_empty = ''