TypeError exception when tests with Django22

(watcher_dashboard.content.audit_templates.tests.AuditTemplatesTest)
test_create_post[1] failed with error:'Cannot encode None as POST data'
This change replaces None with an empty string.

[1]:https://review.opendev.org/#/c/686888/

Change-Id: I06756dbdabca7a5b9049d5ac62dab4f80d66fd76
This commit is contained in:
licanwei 2019-10-10 11:22:29 +08:00
parent 6635f41f04
commit 15a6bb084d

View File

@ -91,7 +91,7 @@ def data(TEST):
'uuid': '11111111-1111-1111-1111-111111111111', 'uuid': '11111111-1111-1111-1111-111111111111',
'name': 'Audit Template 1', 'name': 'Audit Template 1',
'description': 'Audit Template 1 description', 'description': 'Audit Template 1 description',
'scope': None, 'scope': '',
'goal_uuid': 'gggggggg-1111-1111-1111-gggggggggggg', 'goal_uuid': 'gggggggg-1111-1111-1111-gggggggggggg',
'strategy_uuid': 'ssssssss-1111-1111-1111-ssssssssssss', 'strategy_uuid': 'ssssssss-1111-1111-1111-ssssssssssss',
} }
@ -99,7 +99,7 @@ def data(TEST):
'uuid': '11111111-2222-2222-2222-111111111111', 'uuid': '11111111-2222-2222-2222-111111111111',
'name': 'Audit Template 2', 'name': 'Audit Template 2',
'description': 'Audit Template 2 description', 'description': 'Audit Template 2 description',
'scope': None, 'scope': '',
'goal_uuid': 'gggggggg-1111-1111-1111-gggggggggggg', 'goal_uuid': 'gggggggg-1111-1111-1111-gggggggggggg',
'strategy_uuid': 'ssssssss-2222-2222-2222-ssssssssssss', 'strategy_uuid': 'ssssssss-2222-2222-2222-ssssssssssss',
} }
@ -107,7 +107,7 @@ def data(TEST):
'uuid': '11111111-3333-3333-3333-111111111111', 'uuid': '11111111-3333-3333-3333-111111111111',
'name': 'Audit Template 1', 'name': 'Audit Template 1',
'description': 'Audit Template 3 description', 'description': 'Audit Template 3 description',
'scope': None, 'scope': '',
'goal_uuid': 'gggggggg-2222-2222-2222-gggggggggggg', 'goal_uuid': 'gggggggg-2222-2222-2222-gggggggggggg',
'strategy_uuid': None, 'strategy_uuid': None,
} }