Merge lp:~james-w/pkgme-devportal/libdep-service-close into lp:pkgme-devportal

Proposed by James Westby
Status: Merged
Approved by: Jonathan Lange
Approved revision: 138
Merged at revision: 138
Proposed branch: lp:~james-w/pkgme-devportal/libdep-service-close
Merge into: lp:pkgme-devportal
Diff against target: 27 lines (+9/-0)
2 files modified
devportalbinary/database.py (+3/-0)
devportalbinary/tests/test_database.py (+6/-0)
To merge this branch: bzr merge lp:~james-w/pkgme-devportal/libdep-service-close
Reviewer Review Type Date Requested Status
Jonathan Lange Approve
Review via email: mp+130912@code.launchpad.net

Commit message

Add a close method to LibdepServiceClient.

Description of the change

Hi,

Testing on staging revealed that there is a bug because the libdep-service
database has no close method.

This probably indicates that we should have a better test for this (switching
integration tests to use the double). I'll do this tomorrow, but I wanted to
get this up before leaving.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Sure, I'll buy that.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'devportalbinary/database.py'
2--- devportalbinary/database.py 2012-10-16 21:59:28 +0000
3+++ devportalbinary/database.py 2012-10-22 22:18:20 +0000
4@@ -503,6 +503,9 @@
5 return self._client.get_binaries_for_libraries(library_name,
6 [arch])[arch]
7
8+ def close(self):
9+ pass
10+
11
12 def get_dependency_database():
13 """Return an object that can get dependencies."""
14
15=== modified file 'devportalbinary/tests/test_database.py'
16--- devportalbinary/tests/test_database.py 2012-10-16 21:59:28 +0000
17+++ devportalbinary/tests/test_database.py 2012-10-22 22:18:20 +0000
18@@ -461,3 +461,9 @@
19 self.assertEqual(
20 {'libfoo': ['libfoo-bin']},
21 wrapper.get_dependencies(['libfoo'], 'i386'))
22+
23+ def test_has_close_method(self):
24+ client = Client('http://localhost/')
25+ wrapper = LibdepServiceClient(client)
26+ # Check that there is no exception
27+ wrapper.close()

Subscribers

People subscribed via source and target branches