Merge ~twom/launchpad:export-git-id-on-api into launchpad:master

Proposed by Tom Wardill
Status: Merged
Approved by: Tom Wardill
Approved revision: bbb95d477a800012e525bc8d555a6aa94c8e75da
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~twom/launchpad:export-git-id-on-api
Merge into: launchpad:master
Diff against target: 21 lines (+2/-1)
1 file modified
lib/lp/code/model/tests/test_gitrepository.py (+2/-1)
Reviewer Review Type Date Requested Status
Kristian Glass (community) Approve
Thiago F. Pappacena (community) Approve
Review via email: mp+385759@code.launchpad.net

Commit message

Check that ID is present, but not it's value

Description of the change

We don't have the repository at the point of checking it's ID, and all we really need to do is ensure that the ID field is actually exported.
Check it's there, and that it's an int.

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve
Revision history for this message
Kristian Glass (doismellburning) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/model/tests/test_gitrepository.py b/lib/lp/code/model/tests/test_gitrepository.py
2index d9017e2..5408a40 100644
3--- a/lib/lp/code/model/tests/test_gitrepository.py
4+++ b/lib/lp/code/model/tests/test_gitrepository.py
5@@ -34,6 +34,7 @@ from testtools.matchers import (
6 EndsWith,
7 Equals,
8 Is,
9+ IsInstance,
10 LessThan,
11 MatchesDict,
12 MatchesListwise,
13@@ -3731,7 +3732,7 @@ class TestGitRepositoryWebservice(TestCaseWithFactory):
14 self.assertEqual(201, response.status)
15 repository = webservice.get(response.getHeader("Location")).jsonBody()
16 self.assertThat(repository, ContainsDict({
17- "id": Equals(1),
18+ "id": IsInstance(int),
19 "repository_type": Equals("Hosted"),
20 "registrant_link": EndsWith(owner_url),
21 "owner_link": EndsWith(owner_url),

Subscribers

People subscribed via source and target branches

to status/vote changes: