pycodestyle fixes

This commit is contained in:
Timothy Hobbs 2020-02-11 16:47:33 +01:00
parent bb9d886eea
commit 3d7860b5a3
3 changed files with 20 additions and 18 deletions

View File

@ -66,4 +66,3 @@ class DatatablesTicketSerializer(serializers.ModelSerializer):
def get_kbitem(self, obj):
return obj.kbitem.title if obj.kbitem else ""

View File

@ -61,7 +61,8 @@ class QueryTests(TestCase):
response = self.client.get(reverse('helpdesk:datatables_ticket_list', args=[query]))
self.assertEqual(
response.json(),
{"data":
{
"data":
[{"ticket": "1 [test_queue-1]", "id": 1, "priority": 3, "title": "unassigned to kbitem", "queue": {"title": "Test queue", "id": 1}, "status": "Open", "created": "now", "due_date": None, "assigned_to": "None", "submitter": None, "row_class": "", "time_spent": "", "kbitem": ""},
{"ticket": "2 [test_queue-2]", "id": 2, "priority": 3, "title": "assigned to kbitem", "queue": {"title": "Test queue", "id": 1}, "status": "Open", "created": "now", "due_date": None, "assigned_to": "None", "submitter": None, "row_class": "", "time_spent": "", "kbitem": "KBItem 1"}],
"recordsFiltered": 2,
@ -78,7 +79,8 @@ class QueryTests(TestCase):
response = self.client.get(reverse('helpdesk:datatables_ticket_list', args=[query]))
self.assertEqual(
response.json(),
{"data":
{
"data":
[{"ticket": "2 [test_queue-2]", "id": 2, "priority": 3, "title": "assigned to kbitem", "queue": {"title": "Test queue", "id": 1}, "status": "Open", "created": "now", "due_date": None, "assigned_to": "None", "submitter": None, "row_class": "", "time_spent": "", "kbitem": "KBItem 1"}],
"recordsFiltered": 1,
"recordsTotal": 1,
@ -94,7 +96,8 @@ class QueryTests(TestCase):
response = self.client.get(reverse('helpdesk:datatables_ticket_list', args=[query]))
self.assertEqual(
response.json(),
{"data":
{
"data":
[{"ticket": "2 [test_queue-2]", "id": 2, "priority": 3, "title": "assigned to kbitem", "queue": {"title": "Test queue", "id": 1}, "status": "Open", "created": "now", "due_date": None, "assigned_to": "None", "submitter": None, "row_class": "", "time_spent": "", "kbitem": "KBItem 1"}],
"recordsFiltered": 1,
"recordsTotal": 1,