def test_set_environment(self): env = "alternate" sav = pyrax.authenticate pyrax.authenticate = Mock() pyrax.set_environment(env) self.assertEqual(pyrax.get_environment(), env) pyrax.authenticate = sav
def test_get_environment(self): env = pyrax.get_environment() all_envs = pyrax.list_environments() self.assertTrue(env in all_envs)