예제 #1
0
    def test_extend_env_adds_keys_to_a_copy_of_the_current_env(self):
        env = extend_env({
            'BACKUPDB_TEST_ENV_SETTING_1': 1234,
            'BACKUPDB_TEST_ENV_SETTING_2': 1234,
        })

        orig_keys = set(os.environ.keys())
        curr_keys = set(env.keys())
        diff_keys = curr_keys - orig_keys

        self.assertEqual(diff_keys, set([
            'BACKUPDB_TEST_ENV_SETTING_1',
            'BACKUPDB_TEST_ENV_SETTING_2',
        ]))
예제 #2
0
    def test_extend_env_adds_keys_to_a_copy_of_the_current_env(self):
        env = extend_env({
            'BACKUPDB_TEST_ENV_SETTING_1': 1234,
            'BACKUPDB_TEST_ENV_SETTING_2': 1234,
        })

        orig_keys = set(os.environ.keys())
        curr_keys = set(env.keys())
        diff_keys = curr_keys - orig_keys

        self.assertEqual(
            diff_keys,
            set([
                'BACKUPDB_TEST_ENV_SETTING_1',
                'BACKUPDB_TEST_ENV_SETTING_2',
            ]))
예제 #3
0
 def test_extend_env_creates_a_copy_of_the_current_env(self):
     env = extend_env({'BACKUPDB_TEST_ENV_SETTING': 1234})
     self.assertFalse(env is os.environ)
예제 #4
0
 def test_extend_env_creates_a_copy_of_the_current_env(self):
     env = extend_env({'BACKUPDB_TEST_ENV_SETTING': 1234})
     self.assertFalse(env is os.environ)