Skip to content

Commit

Permalink
Merge ed5146e into e454309
Browse files Browse the repository at this point in the history
  • Loading branch information
swizzard committed Aug 5, 2015
2 parents e454309 + ed5146e commit fa49141
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions falcon/testing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,19 @@ class TestBase(unittest.TestCase):
can use to add a route to the API.
"""

def setUp(self):
def setUp(self, api=None, srmock=None):
"""Initializer, unittest-style"""

super(TestBase, self).setUp()
self._id = itertools.count(0)
self.api = falcon.API()
self.srmock = StartResponseMock()
if api is not None:
self.api = api
else:
self.api = falcon.API()
if srmock is not None:
self.srmock = srmock
else:
self.srmock = StartResponseMock()
self.test_route = '/{0}'.format(next(self._id))

# Reset to simulate "restarting" the WSGI container
Expand Down

0 comments on commit fa49141

Please sign in to comment.