您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

tests.py 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from django.test import TestCase
  2. from oscar.apps.address.tests import *
  3. from oscar.apps.basket.tests import *
  4. from oscar.apps.order.tests import *
  5. from oscar.apps.catalogue.tests import *
  6. from oscar.apps.partner.tests import *
  7. from oscar.apps.checkout.tests import *
  8. from oscar.apps.payment.tests import *
  9. from oscar.apps.offer.tests import *
  10. from oscar.apps.shipping.tests import *
  11. from oscar.apps.customer.tests import *
  12. from oscar.apps.promotions.tests import *
  13. from oscar.apps.catalogue.reviews.tests import *
  14. from oscar.apps.voucher.tests import *
  15. from oscar.apps.partner.tests import *
  16. from oscar.apps.dashboard.tests import *
  17. from oscar.core.tests import *
  18. from oscar.core.logging.tests import *
  19. import oscar
  20. class OscarTests(TestCase):
  21. def test_app_list_exists(self):
  22. core_apps = oscar.OSCAR_CORE_APPS
  23. self.assertTrue('oscar' in core_apps)
  24. def test_app_list_can_be_accessed_through_fn(self):
  25. core_apps = oscar.get_core_apps()
  26. self.assertTrue('oscar' in core_apps)
  27. def test_app_list_can_be_accessed_with_overrides(self):
  28. apps = oscar.get_core_apps(overrides=['apps.shipping'])
  29. self.assertTrue('apps.shipping' in apps)
  30. self.assertTrue('oscar.apps.shipping' not in apps)