Codebase list python-procrunner / 2366200
fix test for Python 3 Markus Gerstel 6 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
110110 procrunner.run_process(mock.Mock(), -1, False, environment_override=copy.copy(mock_env2))
111111 random_environment_variable = list(os.environ)[0]
112112 random_environment_value = os.getenv(random_environment_variable)
113 assert random_environment_variable and random_environment_variable != mock_env2.keys()[0]
114 assert mock_subprocess.Popen.call_args[1]['env'][mock_env2.keys()[0]] == mock_env2.values()[0]
113 assert random_environment_variable and random_environment_variable != list(mock_env2)[0]
114 assert mock_subprocess.Popen.call_args[1]['env'][list(mock_env2)[0]] == mock_env2[list(mock_env2)[0]]
115115 assert mock_subprocess.Popen.call_args[1]['env'][random_environment_variable] == os.getenv(random_environment_variable)
116116
117117