Skip to content

Commit

Permalink
Streamer: BadEnvironment exception test
Browse files Browse the repository at this point in the history
  • Loading branch information
hootnot committed Feb 29, 2016
1 parent 1f5fc9e commit 3acfc9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_streaming_rates_and_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def test__Events(self, count, ignore_heartbeat=False):
r.events(ignore_heartbeat=False)
self.assertEqual(count, r.reccnt + r.hbcnt)

def test__Environment(self):
""" test BadEnvironment exception """
with self.assertRaises(oandapy.BadEnvironment) as envErr:
s = Stream(access_token=access_token,
environment="nothing", count=10)
self.assertTrue(isinstance(envErr.exception, oandapy.BadEnvironment))

if __name__ == "__main__":

Expand Down

0 comments on commit 3acfc9d

Please sign in to comment.