From 0765aa89b3b9b03f0b36efdc1178f9ccffef07a9 Mon Sep 17 00:00:00 2001 From: Craig de Stigter Date: Sun, 21 Apr 2024 15:39:45 +1200 Subject: [PATCH] Don't look at user's AWS config when running tests (#1362) If you set up a different config file locally and then run tests, the tests easily fail, and who knows what it's doing with user's credentials :/ --- tox.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 14c69ce2..f1d179e3 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,10 @@ setenv = DJANGO_SETTINGS_MODULE = tests.settings PYTHONWARNINGS = always PYTHONDONTWRITEBYTECODE = 1 -commands = pytest --cov=storages {posargs} + # Use a non-existent file to prevent boto3 from loading + # any configuration from the user's environment + AWS_CONFIG_FILE = {toxinidir}/tests/no_such_file.conf +commands = pytest --cov=storages tests/ {posargs} deps = cryptography django3.2: django~=3.2.9