test_checks.py 375 B

1234567891011121314
  1. import pytest
  2. from django.core.management import call_command
  3. from django.core.management.base import SystemCheckError
  4. def test_storage_check():
  5. call_command("check")
  6. with pytest.raises(SystemCheckError) as e:
  7. call_command("check", "--deploy")
  8. assert ("FileSystemStorage should not be used in a production environment.") in str(
  9. e.value
  10. )