Skip to content

Commit

Permalink
Updated tests to reflect new configuration changes. Fixed bug with ~/…
Browse files Browse the repository at this point in the history
….iron.json.
  • Loading branch information
Paddy Foran committed May 4, 2012
1 parent 96ed814 commit 63f1bd4
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions test.py
Expand Up @@ -9,9 +9,9 @@
class TestConfig(unittest.TestCase): class TestConfig(unittest.TestCase):
def setUp(self): def setUp(self):
# Backup their ~/.iron.json file if it exists # Backup their ~/.iron.json file if it exists
if os.path.exists(os.path.expanduser(".iron.json")): if os.path.exists(os.path.expanduser("~/.iron.json")):
os.rename(os.path.expanduser(".iron.json"), os.rename(os.path.expanduser("~/.iron.json"),
os.path.expanduser(".iron.bak.json")) os.path.expanduser("~/.iron.bak.json"))


# Backup their ./iron.json file if it exists # Backup their ./iron.json file if it exists
if os.path.exists("iron.json"): if os.path.exists("iron.json"):
Expand Down Expand Up @@ -39,16 +39,6 @@ def test_fromArgsMissingProjectID(self):
version="0.1.0", product="iron_worker", api_version=2, version="0.1.0", product="iron_worker", api_version=2,
host="worker-aws-us-east-1.iron.io", token="TEST") host="worker-aws-us-east-1.iron.io", token="TEST")


def test_fromArgsMissingAPIVersion(self):
self.assertRaises(ValueError, iron_core.IronClient, name="Test",
version="0.1.0", product="iron_worker", token="TEST",
host="worker-aws-us-east-1.iron.io", project_id="TEST")

def test_fromArgsMissingHost(self):
self.assertRaises(ValueError, iron_core.IronClient, name="Test",
version="0.1.0", product="iron_worker", token="TEST",
api_version=2, project_id="TEST")

def test_fromArgsProtocolPortMismatch(self): def test_fromArgsProtocolPortMismatch(self):
self.assertRaises(ValueError, iron_core.IronClient, name="Test", self.assertRaises(ValueError, iron_core.IronClient, name="Test",
version="0.1.0", product="iron_worker", token="TEST", version="0.1.0", product="iron_worker", token="TEST",
Expand Down

0 comments on commit 63f1bd4

Please sign in to comment.