diff --git a/tests/test_progit_flask_api_fork.py b/tests/test_progit_flask_api_fork.py index b0bf0fb..d3e90cb 100644 --- a/tests/test_progit_flask_api_fork.py +++ b/tests/test_progit_flask_api_fork.py @@ -87,6 +87,7 @@ class PagureFlaskApiForktests(tests.Modeltests): self.assertEqual(output.status_code, 200) data = json.loads(output.data) data['requests'][0]['date_created'] = '1431414800' + data['requests'][0]['updated_on'] = '1431414800' data['requests'][0]['project']['date_created'] = '1431414800' data['requests'][0]['repo_from']['date_created'] = '1431414800' data['requests'][0]['uid'] = '1431414800' @@ -138,6 +139,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "status": 'Open', "title": "test pull-request", "uid": "1431414800", + "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" @@ -154,6 +156,7 @@ class PagureFlaskApiForktests(tests.Modeltests): self.assertEqual(output.status_code, 200) data2 = json.loads(output.data) data2['requests'][0]['date_created'] = '1431414800' + data2['requests'][0]['updated_on'] = '1431414800' data2['requests'][0]['project']['date_created'] = '1431414800' data2['requests'][0]['repo_from']['date_created'] = '1431414800' data2['requests'][0]['uid'] = '1431414800' @@ -214,6 +217,7 @@ class PagureFlaskApiForktests(tests.Modeltests): self.assertEqual(output.status_code, 200) data = json.loads(output.data) data['date_created'] = '1431414800' + data['updated_on'] = '1431414800' data['project']['date_created'] = '1431414800' data['repo_from']['date_created'] = '1431414800' data['uid'] = '1431414800' @@ -257,6 +261,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "status": 'Open', "title": "test pull-request", "uid": "1431414800", + "updated_on": "1431414800", "user": { "fullname": "PY C", "name": "pingou" @@ -275,6 +280,7 @@ class PagureFlaskApiForktests(tests.Modeltests): data2['repo_from']['date_created'] = '1431414800' data2['uid'] = '1431414800' data2['date_created'] = '1431414800' + data2['updated_on'] = '1431414800' self.assertDictEqual(data, data2) @patch('pagure.lib.notify.send_email') diff --git a/tests/test_progit_lib_git.py b/tests/test_progit_lib_git.py index f1ba0ab..a3c0697 100644 --- a/tests/test_progit_lib_git.py +++ b/tests/test_progit_lib_git.py @@ -689,7 +689,7 @@ new file mode 100644 index 0000000..60f7480 --- /dev/null +++ b/456 -@@ -0,0 +1,76 @@ +@@ -0,0 +1,77 @@ +{ + "assignee": null, + "branch": "master", @@ -756,6 +756,7 @@ index 0000000..60f7480 + "status": "Open", + "title": "test PR", + "uid": "foobar", ++ "updated_on": null, + "user": { + "default_email": "bar@pingou.com", + "emails": [ @@ -787,6 +788,9 @@ index 0000000..60f7480 elif 'date_created' in row: t = row.split(': ')[0] row = '%s: null,' % t + elif 'updated_on' in row: + t = row.split(': ')[0] + row = '%s: null,' % t elif row.startswith('index 00'): row = 'index 0000000..60f7480' elif row.startswith('+++ b/'):