Start adding tests

This commit is contained in:
2023-01-19 14:29:25 -05:00
parent e75c22d583
commit 68423488ff
8 changed files with 319 additions and 96 deletions

View File

@ -156,7 +156,11 @@ def jellyfin_websocket(request):
@csrf_exempt
@api_view(['POST'])
def mopidy_websocket(request):
data_dict = json.loads(request.data)
try:
data_dict = json.loads(request.data)
except TypeError:
logger.warning('Received Mopidy data as dict, rather than a string')
data_dict = request.data
# For making things easier to build new input processors
if getattr(settings, "DUMP_REQUEST_DATA", False):

View File

@ -202,8 +202,6 @@ TIME_ZONE = os.getenv("VROBBLER_TIME_ZONE", "EST")
USE_I18N = True
USE_L10N = True
USE_TZ = True