Permalink
Browse files

Make env setup in test class more granular

  • Loading branch information...
bitprophet committed Mar 20, 2012
1 parent 950fb36 commit 2da65af0c677a906255e12cbe2f828e835a2de60
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/utils.py
View
@@ -45,10 +45,13 @@ def setup(self):
# Temporary local file dir
self.tmpdir = tempfile.mkdtemp()
+ def set_network(self):
+ env.update(to_dict('%s@%s:%s' % (USER, HOST, PORT)))
+
def env_setup(self):
# Set up default networking for test server
env.disable_known_hosts = True
- env.update(to_dict('%s@%s:%s' % (USER, HOST, PORT)))
+ self.set_network()
env.password = PASSWORDS[USER]
# Command response mocking is easier without having to account for
# shell wrapping everywhere.

0 comments on commit 2da65af

Please sign in to comment.