From 7bbe879ed3ea3ae9d205fe30fbfc446807814606 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 05 2020 17:37:50 +0000 Subject: Add a full_url to the JSON representation of our main objects This makes it easier to figure out which pagure instance sent the notification. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/model.py b/pagure/lib/model.py index 57c0179..203c8e3 100644 --- a/pagure/lib/model.py +++ b/pagure/lib/model.py @@ -276,6 +276,12 @@ class User(BASE): """ Ensures the settings are properly saved. """ self._settings = json.dumps(settings) + @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join([base_url, "user", self.user]) + def __repr__(self): """ Return a string representation of this object. """ @@ -287,6 +293,7 @@ class User(BASE): "name": self.user, "fullname": self.fullname, "url_path": self.url_path, + "full_url": self.full_url, } if not public: @@ -653,6 +660,12 @@ class Project(BASE): return path @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join([base_url, self.url_path]) + + @property def tags_text(self): """ Return the list of tags in a simple text form. """ return [tag.tag for tag in self.tags] @@ -1105,6 +1118,7 @@ class Project(BASE): "name": self.name, "fullname": self.fullname, "url_path": self.url_path, + "full_url": self.full_url, "description": self.description, "namespace": self.namespace, "parent": self.parent.to_json(public=public, api=api) @@ -1540,6 +1554,14 @@ class Issue(BASE): out.append(status_board.board.name) return out + @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join( + [base_url, self.project.url_path, "issue", str(self.id)] + ) + def to_json(self, public=False, with_comments=True, with_project=False): """ Returns a dictionary representation of the issue. @@ -1582,6 +1604,7 @@ class Issue(BASE): ] if self.related_prs else [], + "full_url": self.full_url, } comments = [] @@ -2259,6 +2282,14 @@ class PullRequest(BASE): comment for comment in self.comments if not comment.notification ] + @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join( + [base_url, self.project.url_path, "pull-request", str(self.id)] + ) + def to_json(self, public=False, api=False, with_comments=True): """ Returns a dictionary representation of the pull-request. @@ -2292,6 +2323,7 @@ class PullRequest(BASE): "cached_merge_status": self.merge_status or "unknown", "threshold_reached": self.threshold_reached, "tags": self.tags_text, + "full_url": self.full_url, } comments = [] @@ -2719,6 +2751,12 @@ class PagureGroup(BASE): return "Group: %s - name %s" % (self.id, self.group_name) + @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join([base_url, "group", self.group_name]) + def to_json(self, public=False): """ Returns a dictionary representation of the pull-request. @@ -2730,6 +2768,7 @@ class PagureGroup(BASE): "group_type": self.group_type, "creator": self.creator.to_json(public=public), "date_created": arrow_ts(self.created), + "full_url": self.full_url, "members": [user.username for user in self.users], } @@ -3274,6 +3313,12 @@ class Board(BASE): break return out + @property + def full_url(self): + """ Returns the default status of the board. """ + base_url = pagure_config["APP_URL"].rstrip("/") + return "/".join([base_url, self.project.url_path, "boards", self.name]) + def __repr__(self): """ Return a string representation of this object. """ @@ -3286,6 +3331,7 @@ class Board(BASE): "active": self.active, "status": [status.to_json() for status in self.statuses], "tag": self.tag.to_json(), + "full_url": self.full_url, } diff --git a/tests/test_pagure_flask_api_boards.py b/tests/test_pagure_flask_api_boards.py index 6719970..cf6cfd6 100644 --- a/tests/test_pagure_flask_api_boards.py +++ b/tests/test_pagure_flask_api_boards.py @@ -63,6 +63,7 @@ def set_up_board(self): "boards": [ { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [], "tag": { @@ -263,6 +264,7 @@ class PagureFlaskApiBoardstests(tests.SimplePagureTest): "boards": [ { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [], "tag": { @@ -299,6 +301,7 @@ class PagureFlaskApiBoardstests(tests.SimplePagureTest): "boards": [ { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [], "tag": { @@ -309,6 +312,7 @@ class PagureFlaskApiBoardstests(tests.SimplePagureTest): }, { "active": True, + "full_url": "http://localhost.localdomain/test/boards/infra", "name": "infra", "status": [], "tag": { @@ -334,6 +338,7 @@ class PagureFlaskApiBoardstests(tests.SimplePagureTest): "boards": [ { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [], "tag": { @@ -422,6 +427,7 @@ class PagureFlaskApiBoardsWithBoardtests(tests.SimplePagureTest): "boards": [ { "active": False, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [], "tag": { @@ -768,6 +774,7 @@ class PagureFlaskApiBoardsWithBoardtests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -849,6 +856,7 @@ class PagureFlaskApiBoardsWithBoardtests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -930,6 +938,7 @@ class PagureFlaskApiBoardsWithBoardtests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -998,6 +1007,7 @@ class PagureFlaskApiBoardsWithBoardtests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -1240,6 +1250,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -1401,6 +1412,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -1500,6 +1512,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): { "board": { "active": True, + "full_url": "http://localhost.localdomain/test/boards/dev", "name": "dev", "status": [ { @@ -1556,6 +1569,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1566,6 +1580,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): "custom_fields": [], "date_created": "1594654596", "depends": [], + "full_url": "http://localhost.localdomain/test/issue/2", "id": 2, "last_updated": "1594654596", "milestone": None, @@ -1578,6 +1593,7 @@ class PagureFlaskApiBoardsWithBoardAndIssuetests(tests.SimplePagureTest): "user": { "default_email": "foo@bar.com", "emails": ["foo@bar.com"], + "full_url": "http://localhost.localdomain/user/foo", "fullname": "foo bar", "name": "foo", "url_path": "user/foo", diff --git a/tests/test_pagure_flask_api_fork.py b/tests/test_pagure_flask_api_fork.py index 7b5ebb9..4b54d89 100644 --- a/tests/test_pagure_flask_api_fork.py +++ b/tests/test_pagure_flask_api_fork.py @@ -416,6 +416,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "commit_start": None, "commit_stop": None, "date_created": "1431414800", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": None, "last_updated": "1431414800", @@ -443,6 +444,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -453,6 +455,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -483,6 +486,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -493,6 +497,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -505,6 +510,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "uid": "1431414800", "updated_on": "1431414800", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -763,6 +769,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "commit_start": None, "commit_stop": None, "date_created": "1431414800", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": None, "last_updated": "1431414800", @@ -790,6 +797,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -800,6 +808,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -830,6 +839,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -840,6 +850,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -852,6 +863,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "uid": "1431414800", "updated_on": "1431414800", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -933,6 +945,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "commit_start": None, "commit_stop": None, "date_created": "1431414800", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": None, "last_updated": "1431414800", @@ -960,6 +973,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -970,6 +984,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1000,6 +1015,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1010,6 +1026,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "priorities": {}, "tags": [], "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1022,6 +1039,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "uid": uid, "updated_on": "1431414800", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3060,6 +3078,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "commit_start": "114f1b468a5f05e635fcb6394273f3f907386eab", "commit_stop": "114f1b468a5f05e635fcb6394273f3f907386eab", "date_created": "1516348115", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": "Nothing much, the changes speak for themselves", "last_updated": "1516348115", @@ -3087,6 +3106,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3097,6 +3117,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3127,6 +3148,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3137,6 +3159,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3149,6 +3172,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "uid": "e8b68df8711648deac67c3afed15a798", "updated_on": "1516348115", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3209,6 +3233,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "commit_start": "114f1b468a5f05e635fcb6394273f3f907386eab", "commit_stop": "114f1b468a5f05e635fcb6394273f3f907386eab", "date_created": "1516348115", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": None, "last_updated": "1516348115", @@ -3236,6 +3261,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3246,6 +3272,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3276,6 +3303,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3286,6 +3314,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3298,6 +3327,7 @@ class PagureFlaskApiForktests(tests.Modeltests): "uid": "e8b68df8711648deac67c3afed15a798", "updated_on": "1516348115", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3580,6 +3610,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "commit_start": "114f1b468a5f05e635fcb6394273f3f907386eab", "commit_stop": "114f1b468a5f05e635fcb6394273f3f907386eab", "date_created": "1516348115", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": "Nothing much, the changes speak for themselves", "last_updated": "1516348115", @@ -3607,6 +3638,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3617,6 +3649,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3647,6 +3680,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "date_created": "1516348115", "date_modified": "1516348115", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3657,6 +3691,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "tags": [], "url_path": "test", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3669,6 +3704,7 @@ class PagureApiThresholdReachedTests(tests.Modeltests): "uid": "e8b68df8711648deac67c3afed15a798", "updated_on": "1516348115", "user": { + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", diff --git a/tests/test_pagure_flask_api_fork_update.py b/tests/test_pagure_flask_api_fork_update.py index d0bc401..70b4956 100644 --- a/tests/test_pagure_flask_api_fork_update.py +++ b/tests/test_pagure_flask_api_fork_update.py @@ -252,6 +252,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "commit_start": "5f5d609db65d447f77ba00e25afd17ba5053344b", "commit_stop": "5f5d609db65d447f77ba00e25afd17ba5053344b", "date_created": "1551276260", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": "Edited initial comment", "last_updated": "1551276261", @@ -279,6 +280,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -290,6 +292,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -314,6 +317,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/fork/pingou/test", "fullname": "forks/pingou/test", "id": 4, "milestones": {}, @@ -343,6 +347,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -354,6 +359,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -363,6 +369,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "fork/pingou/test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -375,6 +382,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "updated_on": "1551276260", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -422,6 +430,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "commit_start": "5f5d609db65d447f77ba00e25afd17ba5053344b", "commit_stop": "5f5d609db65d447f77ba00e25afd17ba5053344b", "date_created": "1551276260", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": "", "last_updated": "1551276261", @@ -449,6 +458,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -460,6 +470,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -484,6 +495,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/fork/pingou/test", "fullname": "forks/pingou/test", "id": 4, "milestones": {}, @@ -513,6 +525,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -524,6 +537,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -533,6 +547,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "fork/pingou/test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -545,6 +560,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "updated_on": "1551276260", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -611,6 +627,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "commit_start": "5f5d609db65d447f77ba00e25afd17ba5053344b", "commit_stop": "5f5d609db65d447f77ba00e25afd17ba5053344b", "date_created": "1551276260", + "full_url": "http://localhost.localdomain/test/pull-request/1", "id": 1, "initial_comment": "Edited initial comment\n\nthis PR " "fixes #2 \n\nThanks", @@ -639,6 +656,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -650,6 +668,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -674,6 +693,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/fork/pingou/test", "fullname": "forks/pingou/test", "id": 4, "milestones": {}, @@ -703,6 +723,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "date_created": "1551276259", "date_modified": "1551276259", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -714,6 +735,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -723,6 +745,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "url_path": "fork/pingou/test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -735,6 +758,7 @@ class PagureFlaskApiForkUpdatetests(tests.SimplePagureTest): "updated_on": "1551276260", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, diff --git a/tests/test_pagure_flask_api_group.py b/tests/test_pagure_flask_api_group.py index 59cf532..8b739ea 100644 --- a/tests/test_pagure_flask_api_group.py +++ b/tests/test_pagure_flask_api_group.py @@ -159,9 +159,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], @@ -185,9 +187,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -231,9 +235,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "name": "pingou", @@ -274,9 +280,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], "name": "pingou", @@ -320,6 +328,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "date_created": "1492020239", "date_modified": "1492020239", "description": "test project #2", + "full_url": "http://localhost.localdomain/test2", "fullname": "test2", "id": 2, "milestones": {}, @@ -331,6 +340,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "url_path": "test2", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -379,9 +389,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -423,6 +435,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "date_created": "1492020239", "date_modified": "1492020239", "description": "test project #2", + "full_url": "http://localhost.localdomain/test2", "fullname": "test2", "id": 2, "milestones": {}, @@ -434,6 +447,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "url_path": "test2", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -465,9 +479,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -509,6 +525,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "date_created": "1492020239", "date_modified": "1492020239", "description": "test project #2", + "full_url": "http://localhost.localdomain/test2", "fullname": "test2", "id": 2, "milestones": {}, @@ -520,6 +537,7 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): "url_path": "test2", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -563,9 +581,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -615,9 +635,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Some Group", + "full_url": "http://localhost.localdomain/group/some_group", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -665,9 +687,11 @@ class PagureFlaskApiGroupTests(tests.SimplePagureTest): self.assertEqual(output.status_code, 200) exp = { "display_name": "Release engineering group", + "full_url": "http://localhost.localdomain/group/rel-eng", "description": None, "creator": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, diff --git a/tests/test_pagure_flask_api_issue.py b/tests/test_pagure_flask_api_issue.py index ce7727a..01be4b4 100644 --- a/tests/test_pagure_flask_api_issue.py +++ b/tests/test_pagure_flask_api_issue.py @@ -46,6 +46,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "We should work on this", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/2", "date_created": "1431414800", "depends": [], "id": 2, @@ -59,6 +60,7 @@ FULL_ISSUE_LIST = [ "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -66,6 +68,7 @@ FULL_ISSUE_LIST = [ { "assignee": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -76,6 +79,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/8", "date_created": "1431414800", "depends": [], "id": 8, @@ -89,6 +93,7 @@ FULL_ISSUE_LIST = [ "title": "test issue1", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -102,6 +107,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/7", "date_created": "1431414800", "depends": [], "id": 7, @@ -115,6 +121,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -128,6 +135,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/6", "date_created": "1431414800", "depends": [], "id": 6, @@ -141,6 +149,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -154,6 +163,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/5", "date_created": "1431414800", "depends": [], "id": 5, @@ -167,6 +177,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -180,6 +191,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/4", "date_created": "1431414800", "depends": [], "id": 4, @@ -193,6 +205,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -206,6 +219,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/3", "date_created": "1431414800", "depends": [], "id": 3, @@ -219,6 +233,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -232,6 +247,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/2", "date_created": "1431414800", "depends": [], "id": 2, @@ -245,6 +261,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -258,6 +275,7 @@ FULL_ISSUE_LIST = [ "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "depends": [], "id": 1, @@ -271,6 +289,7 @@ FULL_ISSUE_LIST = [ "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -288,6 +307,7 @@ LCL_ISSUES = [ "comments": [], "content": "Description", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/2", "date_created": "1431414800", "depends": [], "id": 2, @@ -301,6 +321,7 @@ LCL_ISSUES = [ "title": "Issue #2", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -314,6 +335,7 @@ LCL_ISSUES = [ "comments": [], "content": "Description", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "depends": [], "id": 1, @@ -327,6 +349,7 @@ LCL_ISSUES = [ "title": "Issue #1", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -507,6 +530,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "closed_at": None, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -518,6 +542,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "priority": None, "milestone": None, "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "closed_by": None, "related_prs": [], "comments": [], @@ -528,12 +553,14 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -681,6 +708,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[7]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -714,6 +742,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[6]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -736,6 +765,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[5]) issue["id"] = 2 + issue["full_url"] = "http://localhost.localdomain/test/issue/2" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -758,6 +788,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[4]) issue["id"] = 3 + issue["full_url"] = "http://localhost.localdomain/test/issue/3" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -780,6 +811,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[3]) issue["id"] = 4 + issue["full_url"] = "http://localhost.localdomain/test/issue/4" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -812,6 +844,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[2]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -834,6 +867,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): exp = copy.deepcopy(FULL_ISSUE_LIST[1]) exp["id"] = 2 + exp["full_url"] = "http://localhost.localdomain/test/issue/2" self.assertDictEqual(data, {"issue": exp, "message": "Issue created"}) @@ -867,6 +901,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[2]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1094,6 +1129,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[7]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1127,6 +1163,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[6]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1149,6 +1186,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[5]) issue["id"] = 2 + issue["full_url"] = "http://localhost.localdomain/test/issue/2" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1171,6 +1209,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[4]) issue["id"] = 3 + issue["full_url"] = "http://localhost.localdomain/test/issue/3" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1193,6 +1232,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[4]) issue["id"] = 4 + issue["full_url"] = "http://localhost.localdomain/test/issue/4" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1225,6 +1265,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[2]) issue["id"] = 1 + issue["full_url"] = "http://localhost.localdomain/test/issue/1" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1247,6 +1288,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): issue = copy.deepcopy(FULL_ISSUE_LIST[1]) issue["id"] = 2 + issue["full_url"] = "http://localhost.localdomain/test/issue/2" self.assertDictEqual( data, {"issue": issue, "message": "Issue created"} @@ -1268,6 +1310,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): exp = copy.deepcopy(FULL_ISSUE_LIST[1]) exp["id"] = 3 + exp["full_url"] = "http://localhost.localdomain/test/issue/3" exp["assignee"] = None self.assertDictEqual(data, {"issue": exp, "message": "Issue created"}) @@ -2670,6 +2713,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test/issue/3", "id": 3, "last_updated": "1431414800", "milestone": None, @@ -2681,6 +2725,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "title": "Issue #3", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2733,6 +2778,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "close_status": None, "closed_at": None, @@ -2749,6 +2795,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2837,6 +2884,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "comments": [], "content": "We should work on this", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/2", "date_created": "1431414800", "close_status": None, "closed_at": None, @@ -2853,6 +2901,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2873,6 +2922,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "comments": [], "content": "We should work on this", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/2", "date_created": "1431414800", "close_status": None, "closed_at": None, @@ -2889,6 +2939,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3166,6 +3217,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "closed_at": None, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3177,6 +3229,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "priority": None, "milestone": "v1.0", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "closed_by": None, "related_prs": [], "comments": [], @@ -3187,12 +3240,14 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3583,6 +3638,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "reactions": {}, "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3611,6 +3667,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "reactions": {}, "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3710,6 +3767,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "reactions": {}, "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -3849,6 +3907,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "closed_at": None, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3858,12 +3917,14 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "blocks": [], "assignee": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, "priority": None, "milestone": None, "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "closed_by": None, "related_prs": [], "comments": [], @@ -3874,12 +3935,14 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3934,6 +3997,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "closed_at": None, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3945,6 +4009,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "priority": None, "milestone": None, "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "closed_by": None, "related_prs": [], "comments": [ @@ -3956,6 +4021,7 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "date_created": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3972,12 +4038,14 @@ class PagureFlaskApiIssuetests(tests.SimplePagureTest): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, diff --git a/tests/test_pagure_flask_api_issue_create.py b/tests/test_pagure_flask_api_issue_create.py index e359c3f..a13b5a1 100644 --- a/tests/test_pagure_flask_api_issue_create.py +++ b/tests/test_pagure_flask_api_issue_create.py @@ -149,6 +149,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "depends": [], "id": 1, @@ -162,6 +163,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -205,6 +207,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "depends": [], "id": 1, @@ -218,6 +221,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "title": "test issue", "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -261,6 +265,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "comments": [], "content": "This issue needs attention", "custom_fields": [], + "full_url": "http://localhost.localdomain/test/issue/1", "date_created": "1431414800", "depends": [], "id": 1, @@ -274,6 +279,7 @@ class PagureFlaskApiIssueCreatetests(tests.Modeltests): "title": "test issue", "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, diff --git a/tests/test_pagure_flask_api_pr_flag.py b/tests/test_pagure_flask_api_pr_flag.py index ae722dd..5d6c2e5 100644 --- a/tests/test_pagure_flask_api_pr_flag.py +++ b/tests/test_pagure_flask_api_pr_flag.py @@ -261,6 +261,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, @@ -268,6 +269,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "access_users": { @@ -301,6 +303,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, @@ -308,6 +311,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "access_users": { @@ -336,12 +340,14 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): }, "remote_git": None, "date_created": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "updated_on": ANY, "last_updated": ANY, "closed_at": None, "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "assignee": None, @@ -367,6 +373,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -398,6 +405,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -476,6 +484,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -520,6 +529,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "id": 1, "uid": ANY, "title": "test pull-request", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, @@ -527,6 +537,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, @@ -534,6 +545,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "access_users": { @@ -567,6 +579,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, @@ -574,6 +587,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "access_users": { @@ -608,6 +622,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "assignee": None, @@ -633,6 +648,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -662,6 +678,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -724,6 +741,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -782,6 +800,7 @@ class PagureFlaskApiPRFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1092,6 +1111,7 @@ class PagureFlaskApiPRFlagUserTokentests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1158,6 +1178,7 @@ class PagureFlaskApiPRFlagUserTokentests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1217,6 +1238,7 @@ class PagureFlaskApiPRFlagUserTokentests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -1393,6 +1415,7 @@ class PagureFlaskApiGetPRFlagtests(tests.Modeltests): "url": "http://jenkins.cloud.fedoraproject.org", "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -1471,6 +1494,7 @@ class PagureFlaskApiGetPRFlagtests(tests.Modeltests): "user": { "fullname": "foo bar", "name": "foo", + "full_url": "http://localhost.localdomain/user/foo", "url_path": "user/foo", }, "username": "jenkins", @@ -1486,6 +1510,7 @@ class PagureFlaskApiGetPRFlagtests(tests.Modeltests): "user": { "fullname": "foo bar", "name": "foo", + "full_url": "http://localhost.localdomain/user/foo", "url_path": "user/foo", }, "username": "travis", diff --git a/tests/test_pagure_flask_api_project.py b/tests/test_pagure_flask_api_project.py index cf297c1..3c60b0f 100644 --- a/tests/test_pagure_flask_api_project.py +++ b/tests/test_pagure_flask_api_project.py @@ -254,6 +254,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -264,6 +265,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -474,6 +476,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -484,8 +487,9 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "priorities": {}, "tags": ["infra"], "user": { - "fullname": "PY C", "name": "pingou", + "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -541,6 +545,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -554,6 +559,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -581,6 +587,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_modified": "1436527638", "description": "test project #2", "fullname": "test2", + "full_url": "http://localhost.localdomain/test2", "url_path": "test2", "id": 2, "milestones": {}, @@ -591,6 +598,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -621,6 +629,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -630,6 +639,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -688,6 +698,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -697,6 +708,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "tags": ["infra"], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -727,6 +739,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #2", "fullname": "test2", "url_path": "test2", + "full_url": "http://localhost.localdomain/test2", "id": 2, "milestones": {}, "name": "test2", @@ -737,6 +750,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -766,6 +780,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -776,6 +791,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -829,6 +845,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -839,6 +856,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -892,6 +910,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -902,6 +921,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -971,6 +991,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -981,6 +1002,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -1063,6 +1085,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1076,6 +1099,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } self.assertDictEqual(data, expected_data) @@ -1157,6 +1181,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "group_details": {"some_group": ["foo"]}, @@ -1171,6 +1196,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } self.assertDictEqual(data, expected_data) @@ -1225,6 +1251,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1238,6 +1265,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } self.assertDictEqual(data, expected_data) @@ -1298,6 +1326,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -1309,6 +1338,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -1337,6 +1367,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #2", "fullname": "test2", "url_path": "test2", + "full_url": "http://localhost.localdomain/test2", "id": 2, "milestones": {}, "name": "test2", @@ -1348,6 +1379,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -1376,6 +1408,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -1387,6 +1420,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, ], @@ -1453,6 +1487,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -1464,6 +1499,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } ], @@ -1617,6 +1653,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -1630,6 +1667,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } self.assertEqual(data, expected_output) @@ -1676,6 +1714,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1496338274", "date_modified": "1496338274", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1691,6 +1730,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } self.assertEqual(data, expected_output) @@ -1747,6 +1787,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1496338274", "date_modified": "1496338274", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1762,6 +1803,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } self.assertEqual(data, expected_output) @@ -1812,6 +1854,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -1825,6 +1868,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } self.assertEqual(data, expected_output) @@ -1875,6 +1919,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "date_created": "1496338274", "date_modified": "1496338274", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "id": 1, @@ -1890,6 +1935,7 @@ class PagureFlaskApiProjecttests(tests.Modeltests): "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } self.assertEqual(data, expected_output) @@ -2917,6 +2963,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -2956,12 +3003,14 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3000,6 +3049,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "date_updated": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3029,6 +3079,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3059,12 +3110,14 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, "date_modified": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3103,6 +3156,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "date_updated": ANY, "user": { "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "url_path": "user/pingou", }, @@ -3132,6 +3186,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3184,6 +3239,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3244,6 +3300,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -3386,6 +3443,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "url": "https://koji.fp.o/koji...", "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -3401,6 +3459,7 @@ class PagureFlaskApiProjectFlagtests(tests.Modeltests): "url": "https://koji.fp.o/koji...", "user": { "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "name": "foo", "url_path": "user/foo", }, @@ -3592,6 +3651,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3603,6 +3663,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3662,6 +3723,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3674,6 +3736,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -3793,6 +3856,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3805,6 +3869,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -3872,6 +3937,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -3884,6 +3950,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -3953,6 +4020,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_modified": "1510742566", "description": "test project #1", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -3963,6 +4031,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -4017,6 +4086,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -4029,6 +4099,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -4100,6 +4171,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "date_created": "1510742565", "date_modified": "1510742566", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -4113,6 +4185,7 @@ class PagureFlaskApiProjectModifyAclTests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } self.assertEqual(data, expected_output) @@ -5382,6 +5455,7 @@ class PagureFlaskApiProjectCreateProjectTests(tests.Modeltests): "fullname": "test_42", "url_path": "test_42", "description": "Just another small test project", + "full_url": "http://localhost.localdomain/test_42", "namespace": None, "parent": None, "date_created": ANY, @@ -5389,6 +5463,7 @@ class PagureFlaskApiProjectCreateProjectTests(tests.Modeltests): "user": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "access_users": { diff --git a/tests/test_pagure_flask_api_project_delete_project.py b/tests/test_pagure_flask_api_project_delete_project.py index 1a0cb7c..7a0d3a1 100644 --- a/tests/test_pagure_flask_api_project_delete_project.py +++ b/tests/test_pagure_flask_api_project_delete_project.py @@ -175,6 +175,7 @@ class PagureFlaskApiProjectDeleteProjecttests(tests.Modeltests): "date_created": "1595341690", "date_modified": "1595341690", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -188,6 +189,7 @@ class PagureFlaskApiProjectDeleteProjecttests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, }, diff --git a/tests/test_pagure_flask_api_ui_private_repo.py b/tests/test_pagure_flask_api_ui_private_repo.py index 03b5994..7ea787d 100644 --- a/tests/test_pagure_flask_api_ui_private_repo.py +++ b/tests/test_pagure_flask_api_ui_private_repo.py @@ -33,6 +33,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/8", "id": 8, "last_updated": "1431414800", "milestone": None, @@ -44,6 +45,7 @@ FULL_ISSUE_LIST = [ "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -59,6 +61,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/7", "id": 7, "last_updated": "1431414800", "milestone": None, @@ -71,6 +74,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -85,6 +89,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/6", "id": 6, "last_updated": "1431414800", "milestone": None, @@ -97,6 +102,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -111,6 +117,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/5", "id": 5, "last_updated": "1431414800", "milestone": None, @@ -123,6 +130,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -137,6 +145,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/4", "id": 4, "last_updated": "1431414800", "milestone": None, @@ -149,6 +158,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -163,6 +173,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/3", "id": 3, "last_updated": "1431414800", "milestone": None, @@ -175,6 +186,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -189,6 +201,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/2", "id": 2, "last_updated": "1431414800", "milestone": None, @@ -201,6 +214,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -215,6 +229,7 @@ FULL_ISSUE_LIST = [ "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "last_updated": "1431414800", "milestone": None, @@ -227,6 +242,7 @@ FULL_ISSUE_LIST = [ "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -1412,6 +1428,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "name": "test4", @@ -1424,6 +1441,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -1472,6 +1490,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1436527638", "date_modified": "1436527638", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "name": "test4", @@ -1484,6 +1503,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, } @@ -1586,6 +1606,7 @@ class PagurePrivateRepotest(tests.Modeltests): "commit_start": None, "commit_stop": None, "date_created": "1431414800", + "full_url": "http://localhost.localdomain/test4/pull-request/1", "last_updated": "1431414800", "id": 1, "initial_comment": None, @@ -1608,6 +1629,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "name": "test4", @@ -1619,6 +1641,7 @@ class PagurePrivateRepotest(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1643,6 +1666,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "fullname": "test4", @@ -1655,6 +1679,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -1666,6 +1691,7 @@ class PagurePrivateRepotest(tests.Modeltests): "updated_on": "1431414800", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1721,6 +1747,7 @@ class PagurePrivateRepotest(tests.Modeltests): "commit_start": None, "commit_stop": None, "date_created": "1431414800", + "full_url": "http://localhost.localdomain/test4/pull-request/1", "last_updated": "1431414800", "id": 1, "initial_comment": None, @@ -1743,6 +1770,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "name": "test4", @@ -1754,6 +1782,7 @@ class PagurePrivateRepotest(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1778,6 +1807,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "date_modified": "1431414800", "description": "test project description", + "full_url": "http://localhost.localdomain/test4", "id": 1, "milestones": {}, "name": "test4", @@ -1789,6 +1819,7 @@ class PagurePrivateRepotest(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1802,6 +1833,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "fullname": "PY C", "name": "pingou", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, }, @@ -2058,6 +2090,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -2116,6 +2149,7 @@ class PagurePrivateRepotest(tests.Modeltests): "user": { "default_email": "bar@pingou.com", "emails": ["bar@pingou.com", "foo@pingou.com"], + "full_url": "http://localhost.localdomain/user/pingou", "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", @@ -2569,6 +2603,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "milestone": None, "priority": None, @@ -2579,6 +2614,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2650,6 +2686,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/2", "id": 2, "milestone": None, "priority": None, @@ -2660,6 +2697,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2676,6 +2714,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "milestone": None, "priority": None, @@ -2686,6 +2725,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2750,6 +2790,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/2", "id": 2, "milestone": None, "priority": None, @@ -2760,6 +2801,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2776,6 +2818,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "milestone": None, "priority": None, @@ -2786,6 +2829,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2921,6 +2965,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/2", "id": 2, "milestone": None, "priority": None, @@ -2931,6 +2976,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -2947,6 +2993,7 @@ class PagurePrivateRepotest(tests.Modeltests): "date_created": "1431414800", "last_updated": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "milestone": None, "priority": None, @@ -2957,6 +3004,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3027,6 +3075,7 @@ class PagurePrivateRepotest(tests.Modeltests): "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "last_updated": "1431414800", "milestone": None, @@ -3038,6 +3087,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3080,6 +3130,7 @@ class PagurePrivateRepotest(tests.Modeltests): "custom_fields": [], "date_created": "1431414800", "depends": [], + "full_url": "http://localhost.localdomain/test4/issue/1", "id": 1, "last_updated": "1431414800", "milestone": None, @@ -3091,6 +3142,7 @@ class PagurePrivateRepotest(tests.Modeltests): "title": "test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3401,6 +3453,7 @@ class PagurePrivateRepotest(tests.Modeltests): "reactions": {}, "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -3429,6 +3482,7 @@ class PagurePrivateRepotest(tests.Modeltests): "reactions": {}, "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, diff --git a/tests/test_pagure_flask_api_user.py b/tests/test_pagure_flask_api_user.py index 7e27638..e62e6eb 100644 --- a/tests/test_pagure_flask_api_user.py +++ b/tests/test_pagure_flask_api_user.py @@ -95,6 +95,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", "avatar_url": "https://seccdn.libravatar.org/avatar/...", }, } @@ -164,6 +165,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "description": "test project #1", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "id": 1, "milestones": {}, "name": "test", @@ -175,6 +177,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -201,6 +204,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "date_created": "1490272832", "date_modified": "1490272832", "description": "test project #2", + "full_url": "http://localhost.localdomain/test2", "fullname": "test2", "url_path": "test2", "id": 2, @@ -214,6 +218,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -242,6 +247,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "description": "namespaced test project", "fullname": "somenamespace/test3", "url_path": "somenamespace/test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "id": 3, "milestones": {}, "name": "test3", @@ -251,6 +257,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "tags": [], "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -269,6 +276,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", "avatar_url": "https://seccdn.libravatar.org/avatar/...", }, } @@ -421,6 +429,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "type": "created", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -435,6 +444,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "type": "commented", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -449,6 +459,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "type": "closed", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -463,6 +474,7 @@ class PagureFlaskApiUSertests(tests.Modeltests): "type": "commented", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1768,6 +1780,7 @@ class PagureFlaskApiUsertestissues(tests.Modeltests): "content": "We should work on this", "custom_fields": [], "date_created": "1513111778", + "full_url": "http://localhost.localdomain/test/issue/1", "depends": [], "id": 1, "last_updated": "1513111778", @@ -1798,6 +1811,7 @@ class PagureFlaskApiUsertestissues(tests.Modeltests): "date_created": "1513111778", "date_modified": "1513111778", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "id": 1, "milestones": {}, @@ -1809,6 +1823,7 @@ class PagureFlaskApiUsertestissues(tests.Modeltests): "url_path": "test", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, @@ -1819,6 +1834,7 @@ class PagureFlaskApiUsertestissues(tests.Modeltests): "title": "Test issue", "user": { "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "name": "pingou", "url_path": "user/pingou", }, diff --git a/tests/test_pagure_flask_rebase.py b/tests/test_pagure_flask_rebase.py index d9cec2d..0de604c 100644 --- a/tests/test_pagure_flask_rebase.py +++ b/tests/test_pagure_flask_rebase.py @@ -473,12 +473,14 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "id": 1, "uid": ANY, "title": "PR from the test branch", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -488,6 +490,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -519,6 +522,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "test", "fullname": "forks/foo/test", "url_path": "fork/foo/test", + "full_url": "http://localhost.localdomain/fork/foo/test", "description": "test project #1", "namespace": None, "parent": { @@ -526,6 +530,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -535,6 +540,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -566,6 +572,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "access_users": { "owner": ["foo"], @@ -595,6 +602,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "assignee": None, "status": "Open", @@ -617,12 +625,14 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "id": 1, "uid": ANY, "title": "PR from the test branch", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -632,6 +642,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -663,6 +674,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "test", "fullname": "forks/foo/test", "url_path": "fork/foo/test", + "full_url": "http://localhost.localdomain/fork/foo/test", "description": "test project #1", "namespace": None, "parent": { @@ -670,6 +682,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -679,6 +692,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -710,6 +724,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "access_users": { "owner": ["foo"], @@ -739,6 +754,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "assignee": None, "status": "Open", @@ -763,6 +779,7 @@ class PagureRebaseNoHooktests(PagureRebaseBasetests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, diff --git a/tests/test_pagure_flask_ui_boards.py b/tests/test_pagure_flask_ui_boards.py index f52e820..5bbfdad 100644 --- a/tests/test_pagure_flask_ui_boards.py +++ b/tests/test_pagure_flask_ui_boards.py @@ -71,6 +71,7 @@ def set_up_board(self): "tag_color": "DeepBlueSky", "tag_description": "", }, + "full_url": "http://localhost.localdomain/test/boards/dev", } ] }, @@ -602,6 +603,7 @@ class PagureFlaskUiBoardstests(tests.SimplePagureTest): "tag_color": "DeepBlueSky", "tag_description": "", }, + "full_url": "http://localhost.localdomain/test/boards/dev", }, "rank": 1, "status": { @@ -633,6 +635,7 @@ class PagureFlaskUiBoardstests(tests.SimplePagureTest): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } ], @@ -640,6 +643,7 @@ class PagureFlaskUiBoardstests(tests.SimplePagureTest): "custom_fields": [], "date_created": "1594654596", "depends": [], + "full_url": "http://localhost.localdomain/test/issue/1", "id": 1, "last_updated": "1594654596", "milestone": None, @@ -655,6 +659,7 @@ class PagureFlaskUiBoardstests(tests.SimplePagureTest): "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py index 50e2f61..3b3d214 100644 --- a/tests/test_pagure_flask_ui_fork.py +++ b/tests/test_pagure_flask_ui_fork.py @@ -2439,12 +2439,14 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -2455,6 +2457,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2486,6 +2489,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2495,6 +2499,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2529,6 +2534,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Closed", @@ -2538,6 +2544,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "initial_comment": None, "cached_merge_status": "unknown", @@ -2557,6 +2564,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2575,12 +2583,14 @@ index 0000000..2a552bb "id": 1, "uid": ANY, "title": "PR from the feature branch", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2590,6 +2600,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2620,6 +2631,7 @@ index 0000000..2a552bb "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -2630,6 +2642,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2664,6 +2677,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Closed", @@ -2673,6 +2687,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "initial_comment": None, "cached_merge_status": "unknown", @@ -2692,6 +2707,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2720,12 +2736,14 @@ index 0000000..2a552bb "id": 1, "uid": ANY, "title": "PR from the feature branch", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2735,6 +2753,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2766,6 +2785,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2775,6 +2795,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2809,6 +2830,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -2818,6 +2840,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "initial_comment": None, "cached_merge_status": "unknown", @@ -2837,6 +2860,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2856,6 +2880,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2873,6 +2898,7 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { @@ -2880,6 +2906,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2889,6 +2916,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2918,6 +2946,7 @@ index 0000000..2a552bb "repo_from": { "id": 1, "name": "test", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "description": "test project #1", @@ -2929,6 +2958,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2963,6 +2993,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -2972,6 +3003,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "initial_comment": None, "cached_merge_status": "unknown", @@ -2991,6 +3023,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -3010,6 +3043,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -3158,6 +3192,7 @@ index 0000000..2a552bb body={ "request": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -3166,6 +3201,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3175,6 +3211,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3206,6 +3243,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3215,6 +3253,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3249,10 +3288,12 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": { "name": "pingou", "fullname": "PY C", + "full_url": "http://localhost.localdomain/user/pingou", "url_path": "user/pingou", }, "status": "Open", @@ -3267,6 +3308,7 @@ index 0000000..2a552bb }, "pullrequest": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -3274,6 +3316,7 @@ index 0000000..2a552bb "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -3284,6 +3327,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3315,6 +3359,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3324,6 +3369,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3358,11 +3404,13 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": { "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "status": "Open", "commit_start": ANY, @@ -3378,6 +3426,7 @@ index 0000000..2a552bb "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -3388,6 +3437,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3421,6 +3471,7 @@ index 0000000..2a552bb body={ "pullrequest": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -3429,6 +3480,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3438,6 +3490,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3469,6 +3522,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3478,6 +3532,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3512,11 +3567,13 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": { "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "status": "Open", "commit_start": ANY, @@ -3533,6 +3590,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3542,6 +3600,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3612,6 +3671,7 @@ index 0000000..2a552bb body={ "request": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -3620,6 +3680,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3629,6 +3690,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3660,6 +3722,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3669,6 +3732,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3703,6 +3767,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Closed", @@ -3727,6 +3792,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -3738,12 +3804,14 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -3754,6 +3822,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3785,6 +3854,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3794,6 +3864,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3828,6 +3899,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Closed", @@ -3852,6 +3924,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -3865,6 +3938,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3874,6 +3948,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3908,6 +3983,7 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { @@ -3915,6 +3991,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3924,6 +4001,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3955,6 +4033,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3964,6 +4043,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3998,6 +4078,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Closed", @@ -4022,6 +4103,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -4035,6 +4117,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4044,6 +4127,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4156,6 +4240,7 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { @@ -4163,6 +4248,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4172,6 +4258,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4203,6 +4290,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4212,6 +4300,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4246,6 +4335,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -4263,6 +4353,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4272,6 +4363,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4361,6 +4453,7 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { @@ -4368,6 +4461,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4377,6 +4471,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4408,6 +4503,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4417,6 +4513,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4451,6 +4548,7 @@ index 0000000..2a552bb "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "assignee": None, "status": "Open", @@ -4477,6 +4575,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -4490,6 +4589,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4499,6 +4599,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4537,6 +4638,7 @@ index 0000000..2a552bb "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "PR from the feature branch", "branch": "master", "project": { @@ -4544,6 +4646,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4553,6 +4656,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4584,6 +4688,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4593,6 +4698,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4627,6 +4733,7 @@ index 0000000..2a552bb "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "assignee": None, "status": "Open", @@ -4653,6 +4760,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -4665,6 +4773,7 @@ index 0000000..2a552bb "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -4675,6 +4784,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4810,6 +4920,7 @@ index 0000000..2a552bb "name": "test", "fullname": "forks/foo/test", "url_path": "fork/foo/test", + "full_url": "http://localhost.localdomain/fork/foo/test", "description": "test project #1", "namespace": None, "parent": { @@ -4817,6 +4928,7 @@ index 0000000..2a552bb "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4826,6 +4938,7 @@ index 0000000..2a552bb "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4857,6 +4970,7 @@ index 0000000..2a552bb "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "access_users": { "owner": ["foo"], @@ -5084,6 +5198,7 @@ More information body={ "pullrequest": { "id": 2, + "full_url": "http://localhost.localdomain/test/pull-request/2", "uid": ANY, "title": "foo bar PR", "branch": "master", @@ -5092,6 +5207,7 @@ More information "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -5101,6 +5217,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -5131,6 +5248,7 @@ More information "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -5141,6 +5259,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -5175,6 +5294,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -6401,6 +6521,7 @@ More information body={ "pullrequest": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -6409,6 +6530,7 @@ More information "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -6418,6 +6540,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -6449,6 +6572,7 @@ More information "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -6458,6 +6582,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -6492,6 +6617,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -6516,6 +6642,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -6741,6 +6868,7 @@ More information body={ "pullrequest": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "PR from the feature branch", "branch": "master", @@ -6749,6 +6877,7 @@ More information "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -6758,6 +6887,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -6788,6 +6918,7 @@ More information "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -6798,6 +6929,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -6832,6 +6964,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -6849,6 +6982,7 @@ More information "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -6858,6 +6992,7 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -6896,12 +7031,14 @@ More information "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": ANY, "editor": { "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "notification": False, "reactions": {}, diff --git a/tests/test_pagure_flask_ui_groups.py b/tests/test_pagure_flask_ui_groups.py index b7b078a..cf4deb8 100644 --- a/tests/test_pagure_flask_ui_groups.py +++ b/tests/test_pagure_flask_ui_groups.py @@ -282,9 +282,11 @@ class PagureFlaskGroupstests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "date_created": ANY, "members": ["pingou"], + "full_url": "http://localhost.localdomain/group/test_group", }, "fields": ["display_name", "description"], "agent": "pingou", diff --git a/tests/test_pagure_flask_ui_issues.py b/tests/test_pagure_flask_ui_issues.py index 671d487..d3ac54a 100644 --- a/tests/test_pagure_flask_ui_issues.py +++ b/tests/test_pagure_flask_ui_issues.py @@ -2004,6 +2004,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "title": "Test issue", "content": "We should work on this", + "full_url": "http://localhost.localdomain/test/issue/1", "status": "Open", "close_status": None, "date_created": ANY, @@ -2013,6 +2014,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": ["green", "red"], @@ -2031,6 +2033,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2040,6 +2043,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2108,6 +2112,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "title": "Test issue", "content": "We should work on this", + "full_url": "http://localhost.localdomain/test/issue/1", "status": "Open", "close_status": None, "date_created": ANY, @@ -2117,6 +2122,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": ["green"], @@ -2140,6 +2146,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2153,6 +2160,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2162,6 +2170,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2608,6 +2617,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "title": "Test issue", "content": "We should work on this", + "full_url": "http://localhost.localdomain/test/issue/1", "status": "Open", "close_status": None, "date_created": ANY, @@ -2617,6 +2627,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": [], @@ -2638,6 +2649,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None, @@ -2651,6 +2663,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -2660,6 +2673,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -2821,6 +2835,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "issue": { "id": 2, "title": "Test issue #2", + "full_url": "http://localhost.localdomain/test/issue/2", "content": "We should work on this again", "status": "Open", "close_status": None, @@ -2831,6 +2846,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "private": False, "tags": [], @@ -2848,6 +2864,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -2858,6 +2875,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3067,6 +3085,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "title": "Test issue", "content": "We should work on this", + "full_url": "http://localhost.localdomain/test/issue/1", "status": "Open", "close_status": None, "date_created": ANY, @@ -3076,6 +3095,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": [], @@ -3093,6 +3113,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -3103,6 +3124,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3212,6 +3234,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "issue": { "id": 1, "title": "Test issue", + "full_url": "http://localhost.localdomain/test/issue/1", "content": "We should work on this", "status": "Open", "close_status": None, @@ -3222,6 +3245,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": [], @@ -3240,6 +3264,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3249,6 +3274,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3347,6 +3373,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "issue": { "id": 2, "title": "Test issue #2", + "full_url": "http://localhost.localdomain/test/issue/2", "content": "We should work on this again", "status": "Open", "close_status": None, @@ -3357,6 +3384,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "private": False, "tags": [], @@ -3375,6 +3403,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -3384,6 +3413,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -3819,6 +3849,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "issue": { "id": 1, "title": "Test issue #1", + "full_url": "http://localhost.localdomain/test/issue/1", "content": "We should work on this!", "status": "Open", "close_status": None, @@ -3829,6 +3860,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": [], @@ -3846,6 +3878,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -3856,6 +3889,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4135,6 +4169,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4144,6 +4179,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4263,6 +4299,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -4272,6 +4309,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -4479,6 +4517,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "issue": { "id": 1, "title": "Test issue", + "full_url": "http://localhost.localdomain/test/issue/1", "content": "We should work on this", "status": "Open", "close_status": None, @@ -4489,6 +4528,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "private": False, "tags": [], @@ -4505,6 +4545,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "project": { "id": 1, "name": "test", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "description": "test project #1", @@ -4516,6 +4557,7 @@ class PagureFlaskIssuestests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], diff --git a/tests/test_pagure_flask_ui_pr_edit.py b/tests/test_pagure_flask_ui_pr_edit.py index fd44659..f3683e6 100644 --- a/tests/test_pagure_flask_ui_pr_edit.py +++ b/tests/test_pagure_flask_ui_pr_edit.py @@ -233,12 +233,14 @@ class PagureFlaskPrEdittests(tests.Modeltests): "id": 1, "uid": ANY, "title": "New title", + "full_url": "http://localhost.localdomain/test/pull-request/1", "branch": "master", "project": { "id": 1, "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -248,6 +250,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -279,6 +282,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "name": "test", "fullname": "forks/foo/test", "url_path": "fork/foo/test", + "full_url": "http://localhost.localdomain/fork/foo/test", "description": "test project #1", "namespace": None, "parent": { @@ -287,6 +291,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "fullname": "test", "url_path": "test", "description": "test project #1", + "full_url": "http://localhost.localdomain/test", "namespace": None, "parent": None, "date_created": ANY, @@ -295,6 +300,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -325,6 +331,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "user": { "name": "foo", "fullname": "foo bar", + "full_url": "http://localhost.localdomain/user/foo", "url_path": "user/foo", }, "access_users": { @@ -355,6 +362,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "name": "foo", "fullname": "foo bar", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, "assignee": None, "status": "Open", @@ -371,6 +379,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -381,6 +390,7 @@ class PagureFlaskPrEdittests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], diff --git a/tests/test_pagure_flask_ui_repo.py b/tests/test_pagure_flask_ui_repo.py index 1c76e6b..e95149c 100644 --- a/tests/test_pagure_flask_ui_repo.py +++ b/tests/test_pagure_flask_ui_repo.py @@ -351,6 +351,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -360,6 +361,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -415,6 +417,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -424,6 +427,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -652,6 +656,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -661,6 +666,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -718,6 +724,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -727,6 +734,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -1038,6 +1046,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -1047,6 +1056,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -1332,6 +1342,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -1341,6 +1352,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -1755,6 +1767,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -1764,6 +1777,7 @@ class PagureFlaskRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], diff --git a/tests/test_pagure_flask_ui_repo_delete_project.py b/tests/test_pagure_flask_ui_repo_delete_project.py index adf8dd0..6e2448b 100644 --- a/tests/test_pagure_flask_ui_repo_delete_project.py +++ b/tests/test_pagure_flask_ui_repo_delete_project.py @@ -205,6 +205,7 @@ class PagureFlaskDeleteRepotests(tests.Modeltests): "name": "test", "fullname": "forks/pingou/test", "url_path": "fork/pingou/test", + "full_url": "http://localhost.localdomain/fork/pingou/test", "description": "test project #1", "namespace": None, "parent": { @@ -212,6 +213,7 @@ class PagureFlaskDeleteRepotests(tests.Modeltests): "name": "test", "fullname": "test", "url_path": "test", + "full_url": "http://localhost.localdomain/test", "description": "test project #1", "namespace": None, "parent": None, @@ -221,6 +223,7 @@ class PagureFlaskDeleteRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -252,6 +255,7 @@ class PagureFlaskDeleteRepotests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], diff --git a/tests/test_pagure_lib_git.py b/tests/test_pagure_lib_git.py index fd73e1b..229bcfe 100644 --- a/tests/test_pagure_lib_git.py +++ b/tests/test_pagure_lib_git.py @@ -35,6 +35,8 @@ from pagure.lib.repo import PagureRepo class PagureLibGittests(tests.Modeltests): """ Tests for pagure.lib.git """ + maxDiff = None + def test_write_gitolite_acls(self): """ Test the write_gitolite_acls function of pagure.lib.git. when the new uesr is an made an admin """ @@ -1411,7 +1413,7 @@ new file mode 100644 index 0000000..60f7480 --- /dev/null +++ b/456 -@@ -0,0 +1,31 @@ +@@ -0,0 +1,33 @@ +{ + "assignee": null, + "blocks": [], @@ -1422,6 +1424,7 @@ index 0000000..60f7480 + "custom_fields": [], + "date_created": null, + "depends": [], ++ "full_url": "http://localhost.localdomain/test_ticket_repo/issue/1", + "id": 1, + "last_updated": null, + "milestone": null, @@ -1437,6 +1440,7 @@ index 0000000..60f7480 + "bar@pingou.com", + "foo@pingou.com" + ], ++ "full_url": "http://localhost.localdomain/user/pingou", + "fullname": "PY C", + "name": "pingou", + "url_path": "user/pingou" @@ -1513,7 +1517,7 @@ diff --git a/123 b/456 index 458821a..77674a8 --- a/123 +++ b/456 -@@ -4,13 +4,33 @@ +@@ -4,14 +4,35 @@ "close_status": null, "closed_at": null, - "comments": [], @@ -1532,6 +1536,7 @@ index 458821a..77674a8 + "emails": [ + "foo@bar.com" + ], ++ "full_url": "http://localhost.localdomain/user/foo", + "fullname": "foo bar", + "name": "foo", + "url_path": "user/foo" @@ -1542,6 +1547,7 @@ index 458821a..77674a8 "custom_fields": [], "date_created": null, "depends": [], + "full_url": "http://localhost.localdomain/test_ticket_repo/issue/1", "id": 1, - "last_updated": "", + "last_updated": "", @@ -1683,7 +1689,7 @@ new file mode 100644 index 0000000..60f7480 --- /dev/null +++ b/456 -@@ -0,0 +1,156 @@ +@@ -0,0 +1,162 @@ +{ + "assignee": null, + "branch": "master", @@ -1695,6 +1701,7 @@ index 0000000..60f7480 + "commit_start": null, + "commit_stop": null, + "date_created": null, ++ "full_url": "http://localhost.localdomain/test_ticket_repo/pull-request/1", + "id": 1, + "initial_comment": null, + "last_updated": null, @@ -1720,6 +1727,7 @@ index 0000000..60f7480 + "date_created": null, + "date_modified": null, + "description": "test project for ticket", ++ "full_url": "http://localhost.localdomain/test_ticket_repo", + "fullname": "test_ticket_repo", + "id": 1, + "milestones": {}, @@ -1755,6 +1763,7 @@ index 0000000..60f7480 + "bar@pingou.com", + "foo@pingou.com" + ], ++ "full_url": "http://localhost.localdomain/user/pingou", + "fullname": "PY C", + "name": "pingou", + "url_path": "user/pingou" @@ -1783,6 +1792,7 @@ index 0000000..60f7480 + "date_created": null, + "date_modified": null, + "description": "test project for ticket", ++ "full_url": "http://localhost.localdomain/test_ticket_repo", + "fullname": "test_ticket_repo", + "id": 1, + "milestones": {}, @@ -1818,6 +1828,7 @@ index 0000000..60f7480 + "bar@pingou.com", + "foo@pingou.com" + ], ++ "full_url": "http://localhost.localdomain/user/pingou", + "fullname": "PY C", + "name": "pingou", + "url_path": "user/pingou" @@ -1835,6 +1846,7 @@ index 0000000..60f7480 + "bar@pingou.com", + "foo@pingou.com" + ], ++ "full_url": "http://localhost.localdomain/user/pingou", + "fullname": "PY C", + "name": "pingou", + "url_path": "user/pingou" @@ -1895,7 +1907,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "pingou", "emails": ["pingou@fedoraproject.org"]}, + "user": { + "name": "pingou", + "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", "priority": 1, } @@ -1920,7 +1936,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "pingou", "emails": ["pingou@fedoraproject.org"]}, + "user": { + "name": "pingou", + "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", } @@ -1942,7 +1962,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "pingou", "emails": ["pingou@fedoraproject.org"]}, + "user": { + "name": "pingou", + "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", "priority": 1, } @@ -1989,7 +2013,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "foo", "emails": ["foo@fedoraproject.org"]}, + "user": { + "name": "foo", + "emails": ["foo@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", } @@ -2012,7 +2040,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "foo", "emails": ["foo@fedoraproject.org"]}, + "user": { + "name": "foo", + "emails": ["foo@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", } @@ -2068,7 +2100,11 @@ index 0000000..60f7480 "comments": [], "content": "bar", "date_created": "1426500263", - "user": {"name": "pingou", "emails": ["pingou@fedoraproject.org"]}, + "user": { + "name": "pingou", + "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", + }, "milestone": "Next Release", "priority": 1, } @@ -2137,6 +2173,7 @@ index 0000000..60f7480 "close_status": "Fixed", "closed_at": "1426595225", "title": "Rename pagure", + "full_url": "http://localhost.localdomain/test/issue/20", "private": False, "content": "This is too much of a conflict with the book", "user": { @@ -2144,6 +2181,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 20, "blocks": [1], @@ -2168,6 +2206,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, }, { @@ -2186,6 +2225,7 @@ index 0000000..60f7480 "name": "ralph", "default_email": "ralph@fedoraproject.org", "emails": ["ralph@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, }, ], @@ -2262,9 +2302,11 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 1, "description": "test project", + "full_url": "http://localhost.localdomain/test", }, "commit_stop": "eface8e13bc2a08a3fb22af9a72a8c90e36b8b89", "user": { @@ -2272,6 +2314,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 7, "comments": [ @@ -2282,6 +2325,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "parent": None, "date_created": "1426843778", @@ -2297,6 +2341,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "parent": None, "date_created": "1426866781", @@ -2312,6 +2357,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "parent": None, "date_created": "1426866950", @@ -2336,6 +2382,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2344,6 +2391,7 @@ index 0000000..60f7480 }, "id": 1, "description": "test project", + "full_url": "http://localhost.localdomain/test", }, "settings": { "issue_tracker": True, @@ -2359,7 +2407,9 @@ index 0000000..60f7480 "name": "fake", "default_email": "fake@fedoraproject.org", "emails": ["fake@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/fake", }, + "full_url": "http://localhost.localdomain/fork/fake/test", "id": 6, "description": "test project", }, @@ -2405,12 +2455,14 @@ index 0000000..60f7480 "name": "test", "custom_keys": [], "date_created": "1426500194", + "full_url": "http://localhost.localdomain/test", "tags": [], "user": { "fullname": "Pierre-YvesChibon", "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2426,6 +2478,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 4, "comments": [], @@ -2436,6 +2489,7 @@ index 0000000..60f7480 "parent": { "parent": None, "name": "test", + "full_url": "http://localhost.localdomain/test", "custom_keys": [], "date_created": "1426500194", "tags": [], @@ -2444,6 +2498,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2467,10 +2522,12 @@ index 0000000..60f7480 "name": "fake", "default_email": "fake@fedoraproject.org", "emails": ["fake@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/fake", }, "project_docs": True, "id": 6, "description": "test project", + "full_url": "http://localhost.localdomain/fork/fake/test", }, "branch": "master", "date_created": "1426843745", @@ -2505,9 +2562,11 @@ index 0000000..60f7480 data = { "status": True, "uid": "d4182a2ac2d541d884742d3037c26e58", + "full_url": "http://localhost.localdomain/test/pull-request/5", "project": { "parent": None, "name": "test3", + "full_url": "http://localhost.localdomain/somenamespace/test3", "custom_keys": [], "namespace": "somenamespace", "date_created": "1426500194", @@ -2517,6 +2576,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2532,6 +2592,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 5, "comments": [], @@ -2542,6 +2603,7 @@ index 0000000..60f7480 "parent": { "parent": None, "name": "test", + "full_url": "http://localhost.localdomain/test", "custom_keys": [], "date_created": "1426500194", "tags": [], @@ -2550,6 +2612,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2565,6 +2628,7 @@ index 0000000..60f7480 "pull_requests": True, }, "name": "test", + "full_url": "http://localhost.localdomain/test", "date_created": "1426843440", "custom_keys": [], "tags": [], @@ -2573,6 +2637,7 @@ index 0000000..60f7480 "name": "fake", "default_email": "fake@fedoraproject.org", "emails": ["fake@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "project_docs": True, "id": 6, @@ -2654,6 +2719,7 @@ index 0000000..60f7480 "tag_color": "DeepBlueSky", "tag_description": "", }, + "full_url": "http://localhost.localdomain/somenamespace/test3/boards/dev", }, "rank": 2, "status": { @@ -2683,6 +2749,7 @@ index 0000000..60f7480 "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } ], @@ -2691,6 +2758,7 @@ index 0000000..60f7480 "date_created": "1594654596", "depends": [], "id": 2, + "full_url": "http://localhost.localdomain/somenamespace/test3/issue/2", "last_updated": "1594654596", "milestone": None, "priority": None, @@ -2705,6 +2773,7 @@ index 0000000..60f7480 "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/pingou", }, } @@ -2792,6 +2861,7 @@ index 0000000..60f7480 "close_status": None, "name": "In Progress", }, + "full_url": "http://localhost.localdomain/somenamespace/test3/boards/dev", } ], "close_status": None, @@ -2813,6 +2883,7 @@ index 0000000..60f7480 "fullname": "PY C", "name": "pingou", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, } ], @@ -2821,6 +2892,7 @@ index 0000000..60f7480 "date_created": "1594654596", "depends": [], "id": 2, + "full_url": "http://localhost.localdomain/somenamespace/test3/issue/2", "last_updated": "1594654596", "milestone": None, "priority": None, @@ -2835,6 +2907,7 @@ index 0000000..60f7480 "fullname": "foo bar", "name": "foo", "url_path": "user/foo", + "full_url": "http://localhost.localdomain/user/foo", }, } @@ -2908,9 +2981,11 @@ index 0000000..60f7480 data = { "status": True, "uid": "d4182a2ac2d541d884742d3037c26e57", + "full_url": "http://localhost.localdomain/test/pull-request/4", "project": { "parent": None, "name": "test", + "full_url": "http://localhost.localdomain/test", "custom_keys": [], "date_created": "1426500194", "tags": [], @@ -2919,6 +2994,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2934,6 +3010,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "id": 4, "comments": [], @@ -2944,6 +3021,7 @@ index 0000000..60f7480 "parent": { "parent": None, "name": "test", + "full_url": "http://localhost.localdomain/test", "custom_keys": [], "date_created": "1426500194", "tags": [], @@ -2952,6 +3030,7 @@ index 0000000..60f7480 "name": "pingou", "default_email": "pingou@fedoraproject.org", "emails": ["pingou@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/pingou", }, "settings": { "issue_tracker": True, @@ -2966,6 +3045,7 @@ index 0000000..60f7480 "project_documentation": True, "pull_requests": True, }, + "full_url": "http://localhost.localdomain/fork/fake/test", "name": "test", "date_created": "1426843440", "custom_keys": [], @@ -2975,6 +3055,7 @@ index 0000000..60f7480 "name": "fake", "default_email": "fake@fedoraproject.org", "emails": ["fake@fedoraproject.org"], + "full_url": "http://localhost.localdomain/user/fake", }, "project_docs": True, "id": 6, @@ -3946,7 +4027,6 @@ index 9f44358..2a552bb 100644 patch = "\n".join(npatch) output.append(patch) - self.assertEqual(output, exp) def test_commit_to_patch_empty_commit(self): diff --git a/tests/test_pagure_lib_git_diff_pr.py b/tests/test_pagure_lib_git_diff_pr.py index d155674..f482a24 100644 --- a/tests/test_pagure_lib_git_diff_pr.py +++ b/tests/test_pagure_lib_git_diff_pr.py @@ -403,11 +403,13 @@ class PagureFlaskForkPrtests(tests.Modeltests): "pullrequest": { "id": 1, "uid": ANY, + "full_url": "http://localhost.localdomain/test/pull-request/1", "title": "test pull-request", "branch": "master", "project": { "id": 1, "name": "test", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "description": "test project #1", @@ -419,6 +421,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -450,12 +453,14 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "test", "fullname": "forks/pingou/test", "url_path": "fork/pingou/test", + "full_url": "http://localhost.localdomain/fork/pingou/test", "description": "test project #1", "namespace": None, "parent": { "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -466,6 +471,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -497,6 +503,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -531,6 +538,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -551,6 +559,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): body={ "pullrequest": { "id": 1, + "full_url": "http://localhost.localdomain/test/pull-request/1", "uid": ANY, "title": "test pull-request", "branch": "master", @@ -558,6 +567,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "id": 1, "name": "test", "fullname": "test", + "full_url": "http://localhost.localdomain/test", "url_path": "test", "description": "test project #1", "namespace": None, @@ -568,6 +578,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -597,6 +608,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "repo_from": { "id": 2, "name": "test", + "full_url": "http://localhost.localdomain/fork/pingou/test", "fullname": "forks/pingou/test", "url_path": "fork/pingou/test", "description": "test project #1", @@ -604,6 +616,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "parent": { "id": 1, "name": "test", + "full_url": "http://localhost.localdomain/test", "fullname": "test", "url_path": "test", "description": "test project #1", @@ -615,6 +628,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -646,6 +660,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "access_users": { "owner": ["pingou"], @@ -680,6 +695,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "assignee": None, "status": "Open", @@ -706,6 +722,7 @@ class PagureFlaskForkPrtests(tests.Modeltests): "name": "pingou", "fullname": "PY C", "url_path": "user/pingou", + "full_url": "http://localhost.localdomain/user/pingou", }, "edited_on": None, "editor": None,