You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_settings.py 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. """
  2. Special settings file for use when testing. This specifies a SQLite
  3. database to use when running tests.
  4. Just make sure you run the tests and specify this file:
  5. > ./manage.py test -settings=test_settings
  6. """
  7. import sys
  8. sys.path.append("../..")
  9. from settings import *
  10. DATABASES = {
  11. 'default': {
  12. 'ENGINE': 'django.db.backends.sqlite3',
  13. 'NAME': ':memory:',
  14. 'USER': '', # Not used with sqlite3.
  15. 'PASSWORD': '', # Not used with sqlite3.
  16. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  17. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  18. }
  19. }
  20. LOGGING = {
  21. 'version': 1,
  22. 'disable_existing_loggers': True,
  23. 'handlers': {
  24. 'null': {
  25. 'level':'DEBUG',
  26. 'class':'django.utils.log.NullHandler',
  27. },
  28. },
  29. 'loggers': {
  30. 'django': {
  31. 'handlers':['null'],
  32. 'propagate': True,
  33. 'level':'INFO',
  34. },
  35. 'django.request': {
  36. 'handlers': ['null'],
  37. 'level': 'ERROR',
  38. 'propagate': False,
  39. },
  40. 'oscar.checkout': {
  41. 'handlers': ['null'],
  42. 'propagate': True,
  43. 'level':'INFO',
  44. },
  45. 'django.db.backends': {
  46. 'handlers':['null'],
  47. 'propagate': False,
  48. 'level':'DEBUG',
  49. },
  50. }
  51. }