Merge lp:~elopio/u1-test-utils/fix-1134883-api_response_ints into lp:u1-test-utils

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 36
Merged at revision: 34
Proposed branch: lp:~elopio/u1-test-utils/fix-1134883-api_response_ints
Merge into: lp:u1-test-utils
Diff against target: 47 lines (+5/-5)
3 files modified
requirements.txt (+2/-2)
u1testutils/sst/sso/client.py (+1/-1)
u1testutils/sst/sso/selftests/unit/test_client.py (+2/-2)
To merge this branch: bzr merge lp:~elopio/u1-test-utils/fix-1134883-api_response_ints
Reviewer Review Type Date Requested Status
Matias Bordese (community) Approve
Review via email: mp+150935@code.launchpad.net

Commit message

Changed the API response codes to ints in the code and the test mocks.

Description of the change

Changed the API response codes to ints in the code and the test mocks.

To post a comment you must log in.
35. By Leo Arias

Updated the ssoclient version on the requirements.

36. By Leo Arias

Tests don't pass with django 1.5.

Revision history for this message
Matias Bordese (matiasb) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'requirements.txt'
2--- requirements.txt 2013-02-14 13:44:35 +0000
3+++ requirements.txt 2013-02-27 23:21:22 +0000
4@@ -1,9 +1,9 @@
5 # Packages.
6-django
7+django==1.4
8 mock
9 pep8
10 pyflakes
11 sst
12 Twisted
13 bzr+ssh://bazaar.launchpad.net/~bloodearnest/localmail/trunk
14-bzr+http://bazaar.launchpad.net/~canonical-isd-hackers/canonical-identity-provider/ssoclient@1
15+bzr+http://bazaar.launchpad.net/~canonical-isd-hackers/canonical-identity-provider/ssoclient@3
16
17=== modified file 'u1testutils/sst/sso/client.py'
18--- u1testutils/sst/sso/client.py 2013-02-26 20:38:37 +0000
19+++ u1testutils/sst/sso/client.py 2013-02-27 23:21:22 +0000
20@@ -37,4 +37,4 @@
21 client = get_api_client()
22 response = client.register(email=user.email, password=user.password,
23 displayname=user.full_name)
24- return response.status_code == '201'
25+ return response.status_code == 201
26
27=== modified file 'u1testutils/sst/sso/selftests/unit/test_client.py'
28--- u1testutils/sst/sso/selftests/unit/test_client.py 2013-02-26 20:38:37 +0000
29+++ u1testutils/sst/sso/selftests/unit/test_client.py 2013-02-27 23:21:22 +0000
30@@ -69,7 +69,7 @@
31 def test_create_new_account_created(self):
32 user = data.User.make_from_configuration()
33 mock_register = Mock()
34- mock_register.return_value.status_code = '201'
35+ mock_register.return_value.status_code = 201
36 client_register = self.base_namespace + '.V2ApiClient.register'
37 with patch(client_register, mock_register):
38 created = client.create_new_account(user)
39@@ -78,7 +78,7 @@
40 def test_create_new_account_failed(self):
41 user = data.User.make_from_configuration()
42 mock_register = Mock()
43- mock_register.return_value.status_code = '400'
44+ mock_register.return_value.status_code = 400
45 client_register = self.base_namespace + '.V2ApiClient.register'
46 with patch(client_register, mock_register):
47 created = client.create_new_account(user)

Subscribers

People subscribed via source and target branches

to all changes: