Fix broken tests
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse, HttpResponseBadRequest
|
||||
from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest
|
||||
from django.views.decorators.http import require_http_methods
|
||||
|
||||
from infoscreen.models import Rotation, InfoItem, InfoInstance
|
||||
from infoscreen.hsl_fetcher import HSLFetcher
|
||||
|
||||
import json
|
||||
import logging
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
@@ -72,7 +73,8 @@ def info_items(request, *args, **kwargs):
|
||||
for c in classes:
|
||||
for i in c.objects.all():
|
||||
items.append(i.get_dict())
|
||||
return HttpResponse(json.dumps(items))
|
||||
|
||||
return JsonResponse(items, safe=False)
|
||||
|
||||
|
||||
@require_http_methods(["GET"])
|
||||
|
||||
Reference in New Issue
Block a user