Merge pull request #185482 from risicle/ris-django-storages-tests

This commit is contained in:
Martin Weinelt 2022-08-06 23:42:55 +02:00 committed by GitHub
commit d67e3f2e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,12 @@
{ lib, buildPythonPackage, fetchPypi
, django
, azure-storage-blob
, boto3
, dropbox
, google-cloud-storage
, libcloud
, paramiko
}:
buildPythonPackage rec {
@ -13,8 +20,23 @@ buildPythonPackage rec {
propagatedBuildInputs = [ django ];
# django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
doCheck = false;
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
# timezone issues https://github.com/jschneier/django-storages/issues/1171
substituteInPlace tests/test_sftp.py \
--replace 'test_accessed_time' 'dont_test_accessed_time' \
--replace 'test_modified_time' 'dont_test_modified_time'
'';
checkInputs = [
azure-storage-blob
boto3
dropbox
google-cloud-storage
libcloud
paramiko
];
pythonImportsCheck = [ "storages" ];
meta = with lib; {
description = "Collection of custom storage backends for Django";