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
=== modified file 'debian/control'
--- debian/control 2011-11-10 20:11:45 +0000
+++ debian/control 2011-12-09 00:01:25 +0000
@@ -12,11 +12,12 @@
12Package: python3-microfiber12Package: python3-microfiber
13Architecture: all13Architecture: all
14Depends: ${misc:Depends}, python3 (>= 3.2)14Depends: ${misc:Depends}, python3 (>= 3.2)
15Suggests: python3-microfiber-doc, python3-usercouch
15Description: fabric for a lightweight Couch16Description: fabric for a lightweight Couch
16 microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON17 Microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
17 loving REST API like CouchDB. Rather than wrapping the API in a bunch of18 loving REST API like CouchDB. Rather than wrapping the API in a bunch of
18 one-off methods, microfiber just makes it super easy to call any part of the19 one-off methods, Microfiber just makes it super easy to call any part of the
19 CouchDB REST API, current or future. This approach allows microfiber to be20 CouchDB REST API, current or future. This approach allows Microfiber to be
20 very simple and basically maintenance free as it requires no changes to support21 very simple and basically maintenance free as it requires no changes to support
21 new additions to the CouchDB API.22 new additions to the CouchDB API.
2223
@@ -26,10 +27,10 @@
26Depends: ${misc:Depends}, libjs-jquery27Depends: ${misc:Depends}, libjs-jquery
27Suggests: python3-microfiber28Suggests: python3-microfiber
28Description: documentation for python3-microfiber29Description: documentation for python3-microfiber
29 microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON30 Microfiber is an abstract adapter for making HTTP requests to an arbitrary JSON
30 loving REST API like CouchDB. Rather than wrapping the API in a bunch of31 loving REST API like CouchDB. Rather than wrapping the API in a bunch of
31 one-off methods, microfiber just makes it super easy to call any part of the32 one-off methods, Microfiber just makes it super easy to call any part of the
32 CouchDB REST API, current or future. This approach allows microfiber to be33 CouchDB REST API, current or future. This approach allows Microfiber to be
33 very simple and basically maintenance free as it requires no changes to support34 very simple and basically maintenance free as it requires no changes to support
34 new additions to the CouchDB API.35 new additions to the CouchDB API.
35 .36 .
3637
=== modified file 'setup.py'
--- setup.py 2011-10-24 16:07:43 +0000
+++ setup.py 2011-12-09 00:01:25 +0000
@@ -44,12 +44,14 @@
4444
45 user_options = [45 user_options = [
46 ('no-live', None, 'skip live tests against tmp CouchDB instances'),46 ('no-live', None, 'skip live tests against tmp CouchDB instances'),
47 ('oauth', None, 'run live tests using oauth instead of basic auth'),47 ('auth=', None,
48 "live test with 'open', 'basic', or 'oauth'; default is 'basic'"
49 ),
48 ]50 ]
4951
50 def initialize_options(self):52 def initialize_options(self):
51 self.no_live = 053 self.no_live = 0
52 self.oauth = 054 self.auth = 'basic'
5355
54 def finalize_options(self):56 def finalize_options(self):
55 pass57 pass
@@ -58,9 +60,8 @@
58 # Possibly set environ variables for live test:60 # Possibly set environ variables for live test:
59 if self.no_live:61 if self.no_live:
60 os.environ['MICROFIBER_TEST_NO_LIVE'] = 'true'62 os.environ['MICROFIBER_TEST_NO_LIVE'] = 'true'
6163 else:
62 if self.oauth:64 os.environ['MICROFIBER_TEST_AUTH'] = self.auth
63 os.environ['MICROFIBER_TEST_OAUTH'] = 'true'
6465
65 pynames = ['microfiber', 'test_microfiber']66 pynames = ['microfiber', 'test_microfiber']
6667
6768
=== modified file 'test_microfiber.py'
--- test_microfiber.py 2011-10-23 03:58:25 +0000
+++ test_microfiber.py 2011-12-09 00:01:25 +0000
@@ -488,9 +488,9 @@
488 self.skipTest('called with --no-live')488 self.skipTest('called with --no-live')
489 if usercouch is None:489 if usercouch is None:
490 self.skipTest('`usercouch` not installed')490 self.skipTest('`usercouch` not installed')
491 self.oauth = (os.environ.get('MICROFIBER_TEST_OAUTH') == 'true')491 self.auth = os.environ.get('MICROFIBER_TEST_AUTH', 'basic')
492 self.tmpcouch = usercouch.misc.TempCouch()492 self.tmpcouch = usercouch.misc.TempCouch()
493 self.env = self.tmpcouch.bootstrap(self.oauth)493 self.env = self.tmpcouch.bootstrap(self.auth)
494494
495 def tearDown(self):495 def tearDown(self):
496 self.tmpcouch = None496 self.tmpcouch = None

Subscribers

People subscribed via source and target branches