Skip to content

Commit

Permalink
Ensure response handlers are initialized in gabbi-run
Browse files Browse the repository at this point in the history
The test generation code path is something different from the
norm so there is a bit of redundancy that may able to be factored
out in the future.
  • Loading branch information
cdent committed Apr 19, 2015
1 parent 38f3231 commit 29fd7c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gabbi/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
import yaml
import unittest

from . import driver
from gabbi import driver
from gabbi import case


def run():
Expand Down Expand Up @@ -49,6 +50,11 @@ def run():
except IndexError:
host, port = 'stub', None
loader = unittest.defaultTestLoader

# Initialize the extensions for response handling.
for handler in driver.RESPONSE_HANDLERS:
handler(case.HTTPTestCase)

data = yaml.safe_load(sys.stdin.read())
suite = driver.test_suite_from_yaml(loader, 'input', data, '.',
host, port, None, None)
Expand Down

0 comments on commit 29fd7c1

Please sign in to comment.