(cli, dotenv_file, export_mode, variable, value, expected)
| 130 | ) |
| 131 | ) |
| 132 | def test_set_export(cli, dotenv_file, export_mode, variable, value, expected): |
| 133 | result = cli.invoke( |
| 134 | dotenv_cli, |
| 135 | ["--file", dotenv_file, "--quote", "always", "--export", export_mode, "set", variable, value] |
| 136 | ) |
| 137 | |
| 138 | assert (result.exit_code, result.output) == (0, "{}={}\n".format(variable, value)) |
| 139 | assert open(dotenv_file, "r").read() == expected |
| 140 | |
| 141 | |
| 142 | def test_set_non_existent_file(cli): |