def test_reset_environment_name(self): activate_environment('ENVIRONMENT') t1 = MockClass() t1.initilize_once() assert_equal(t1.count, 1) reset_environment('ENVIRONMENT') t1.initilize_once() assert_equal(t1.count, 2)
def test_reset_environment_name(self): activate_environment('ENVIRONMENT') t1 = TestClass() t1.initilize_once() assert_equal(t1.count, 1) reset_environment('ENVIRONMENT') t1.initilize_once() assert_equal(t1.count, 2)
def test_reset_current_environment(self): activate_environment('CURRENT_ENVIRONMENT') t1 = TestClass() t1.initilize_once() assert_equal(t1.count, 1) reset_environment() t1.initilize_once() assert_equal(t1.count, 2)
def test_switch_environment(self): activate_environment('ENVIRONMENT1') t1 = MockClass() t1.initilize_once() assert_equal(t1.count, 1) activate_environment('ENVIRONMENT2') t1.initilize_once() assert_equal(t1.count, 2) activate_environment('ENVIRONMENT1') t1.initilize_once() assert_equal(t1.count, 2)
def test_switch_environment(self): activate_environment('ENVIRONMENT1') t1 = TestClass() t1.initilize_once() assert_equal(t1.count, 1) activate_environment('ENVIRONMENT2') t1.initilize_once() assert_equal(t1.count, 2) activate_environment('ENVIRONMENT1') t1.initilize_once() assert_equal(t1.count, 2)
def setUp(self): activate_environment('TEST_ENVIRONMENT')