API - fix test

This commit is contained in:
Sam 2021-05-22 18:06:16 +02:00
parent 8fcbbf010c
commit 423aaa3e64

View File

@ -1,5 +1,6 @@
import json import json
import os import os
import re
from datetime import datetime from datetime import datetime
from io import BytesIO from io import BytesIO
from typing import Dict from typing import Dict
@ -481,9 +482,9 @@ class TestPostWorkoutWithGpx(ApiTestCaseMixin):
data = json.loads(response.data.decode()) data = json.loads(response.data.decode())
assert response.status_code == 413 assert response.status_code == 413
assert 'fail' in data['status'] assert 'fail' in data['status']
assert ( assert re.match(
'Error during workout upload, file size (3.6KB) exceeds 1.0KB.' r'Error during workout upload, file size \((.*)\) exceeds 1.0KB.',
in data['message'] data['message'],
) )
assert 'data' not in data assert 'data' not in data