~jaypipes/+junk/creiht-paste-deploy

« back to all changes in this revision

Viewing changes to tests/stubs.py

  • Committer: Tarmac
  • Author(s): Rick Harris
  • Date: 2010-12-05 17:22:07 UTC
  • mfrom: (19.1.3 teller-api)
  • Revision ID: hudson@openstack.org-20101205172207-zk3kynqvxmaj4vew
Just some small cleanups, fixing:
  * Swapped port numbers (Parallax Port <=> Teller port)
  * Removing extraneous routes in Teller API
  * Adding required slashes to do_request

Ran unit-tests and they passed.

Tested functionally using curl and tests/test_data.py, everything worked.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
        """
267
267
        Returns the proper connection type
268
268
        """
269
 
        if client.port == 9191 and client.netloc == '127.0.0.1':
 
269
        DEFAULT_PARALLAX_PORT = 9191
 
270
        DEFAULT_TELLER_PORT = 9292
 
271
 
 
272
        if (client.port == DEFAULT_TELLER_PORT and
 
273
            client.netloc == '127.0.0.1'):
270
274
            return FakeTellerConnection
271
 
        if client.port == 9292 and client.netloc == '127.0.0.1':
 
275
        elif (client.port == DEFAULT_PARALLAX_PORT and
 
276
              client.netloc == '127.0.0.1'):
272
277
            return FakeParallaxConnection
273
278
        else:
274
279
            try: