Merge lp:~jderose/microfiber/no-auth into lp:microfiber

Proposed by Jason Gerard DeRose
Status: Merged
Merged at revision: 98
Proposed branch: lp:~jderose/microfiber/no-auth
Merge into: lp:microfiber
Diff against target: 82 lines (+15/-13)
3 files modified
debian/control (+7/-6)
setup.py (+6/-5)
test_microfiber.py (+2/-2)
To merge this branch: bzr merge lp:~jderose/microfiber/no-auth
Reviewer Review Type Date Requested Status
microfiber dev Pending
Review via email: mp+85050@code.launchpad.net

Description of the change

Okay, done. You can now run live tests like this:

./setup.py test --auth=open

When auth can be 'open', 'basic', or 'oauth'. The default is 'basic'.

Also made some small changes to debian/control.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2011-11-10 20:11:45 +0000
3+++ debian/control 2011-12-09 00:01:25 +0000
4@@ -12,11 +12,12 @@
5 Package: python3-microfiber
6 Architecture: all
7 Depends: ${misc:Depends}, python3 (>= 3.2)
8+Suggests: python3-microfiber-doc, python3-usercouch
9 Description: fabric for a lightweight Couch
10- microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
11+ Microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
12 loving REST API like CouchDB. Rather than wrapping the API in a bunch of
13- one-off methods, microfiber just makes it super easy to call any part of the
14- CouchDB REST API, current or future. This approach allows microfiber to be
15+ one-off methods, Microfiber just makes it super easy to call any part of the
16+ CouchDB REST API, current or future. This approach allows Microfiber to be
17 very simple and basically maintenance free as it requires no changes to support
18 new additions to the CouchDB API.
19
20@@ -26,10 +27,10 @@
21 Depends: ${misc:Depends}, libjs-jquery
22 Suggests: python3-microfiber
23 Description: documentation for python3-microfiber
24- microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
25+ Microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
26 loving REST API like CouchDB. Rather than wrapping the API in a bunch of
27- one-off methods, microfiber just makes it super easy to call any part of the
28- CouchDB REST API, current or future. This approach allows microfiber to be
29+ one-off methods, Microfiber just makes it super easy to call any part of the
30+ CouchDB REST API, current or future. This approach allows Microfiber to be
31 very simple and basically maintenance free as it requires no changes to support
32 new additions to the CouchDB API.
33 .
34
35=== modified file 'setup.py'
36--- setup.py 2011-10-24 16:07:43 +0000
37+++ setup.py 2011-12-09 00:01:25 +0000
38@@ -44,12 +44,14 @@
39
40 user_options = [
41 ('no-live', None, 'skip live tests against tmp CouchDB instances'),
42- ('oauth', None, 'run live tests using oauth instead of basic auth'),
43+ ('auth=', None,
44+ "live test with 'open', 'basic', or 'oauth'; default is 'basic'"
45+ ),
46 ]
47
48 def initialize_options(self):
49 self.no_live = 0
50- self.oauth = 0
51+ self.auth = 'basic'
52
53 def finalize_options(self):
54 pass
55@@ -58,9 +60,8 @@
56 # Possibly set environ variables for live test:
57 if self.no_live:
58 os.environ['MICROFIBER_TEST_NO_LIVE'] = 'true'
59-
60- if self.oauth:
61- os.environ['MICROFIBER_TEST_OAUTH'] = 'true'
62+ else:
63+ os.environ['MICROFIBER_TEST_AUTH'] = self.auth
64
65 pynames = ['microfiber', 'test_microfiber']
66
67
68=== modified file 'test_microfiber.py'
69--- test_microfiber.py 2011-10-23 03:58:25 +0000
70+++ test_microfiber.py 2011-12-09 00:01:25 +0000
71@@ -488,9 +488,9 @@
72 self.skipTest('called with --no-live')
73 if usercouch is None:
74 self.skipTest('`usercouch` not installed')
75- self.oauth = (os.environ.get('MICROFIBER_TEST_OAUTH') == 'true')
76+ self.auth = os.environ.get('MICROFIBER_TEST_AUTH', 'basic')
77 self.tmpcouch = usercouch.misc.TempCouch()
78- self.env = self.tmpcouch.bootstrap(self.oauth)
79+ self.env = self.tmpcouch.bootstrap(self.auth)
80
81 def tearDown(self):
82 self.tmpcouch = None

Subscribers

People subscribed via source and target branches