Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Error 🚀 #1

Open
yezz123 opened this issue Jun 6, 2021 · 0 comments
Open

Test Error 🚀 #1

yezz123 opened this issue Jun 6, 2021 · 0 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@yezz123
Copy link
Member

yezz123 commented Jun 6, 2021

When i run the test command i get this issue

Creating test database for alias 'default'...
System check identified some issues:

WARNINGS:
checkout.Order: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the CheckoutConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
checkout.OrderLineItem: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the CheckoutConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
products.Product: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the ProductsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.

System check identified 3 issues (0 silenced).
F..EFE
======================================================================
ERROR: test_cart_resolves (cart.tests.CartTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/cart/tests.py", line 9, in test_cart_resolves
    cart_page = resolvers('/cart/')
TypeError: 'module' object is not callable

======================================================================
ERROR: search.tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: search.tests
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/search/tests.py", line 3, in <module>
    from .views import do_search
ImportError: cannot import name 'do_search' from 'search.views' (/home/yezz123/Documents/E-Commerce-Boilerplate/search/views.py)


======================================================================
FAIL: test_registration_form (accounts.tests.CustomUserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/accounts/tests.py", line 17, in test_registration_form
    self.assertTrue(form.is_valid())
AssertionError: False is not true

======================================================================
FAIL: test_str (products.tests.ProductTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/yezz123/Documents/E-Commerce-Boilerplate/products/tests.py", line 9, in test_str
    self. assertEqual(str(test_name), 'product')
AssertionError: '' != 'product'
+ product

----------------------------------------------------------------------
Ran 6 tests in 0.097s

FAILED (failures=2, errors=2)
Destroying test database for alias 'default'...
@yezz123 yezz123 added bug Something isn't working help wanted Extra attention is needed labels Jun 6, 2021
@yezz123 yezz123 self-assigned this Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant