From 6fac0c0013247a4a704c5803c3ffd22580030925 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jan 18 2017 12:46:41 +0000 Subject: Adjust test case --- diff --git a/pagure/lib/model.py b/pagure/lib/model.py index 19707a4..41d7493 100644 --- a/pagure/lib/model.py +++ b/pagure/lib/model.py @@ -1008,12 +1008,12 @@ class IssueKeys(BASE): return None @data.setter - def data(self, list_str): - ''' Store the list in JSON. ''' - if list_str is None: + def data(self, data_obj): + ''' Store the list data in JSON. ''' + if data_obj is None: self.key_data = None else: - self.key_data = json.dumps(list_str) + self.key_data = json.dumps(data_obj) class IssueValues(BASE): diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py index 1a75cb7..3b71ea3 100644 --- a/tests/test_pagure_flask_api_issue.py +++ b/tests/test_pagure_flask_api_issue.py @@ -1909,14 +1909,13 @@ class PagureFlaskApiIssuetests(tests.Modeltests): # Check the project custom fields were correctly set for key in repo.issue_keys: # Check that the bugzilla field correctly had its data removed - if key.name == "bugzilla" and key.data is not None: - assert False + if key.name == "bugzilla": + self.assertTrue(key.data is None) # Check that the reviewstatus list field still has its list if (key.name == "reviewstatus"): for item in ['ack', 'nack', 'needs review']: - if item not in key.data: - assert False + self.assertFalse(item not in key.data) # No value specified while we try to create the field output = self.app.post(