Mesmo após eu ter feito as mudanças que você passou ainda sim está dando erro após eu rodar o comando python manage.py test alguém poderia me ajudar, por favor?
Found 2 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
EE
======================================================================
ERROR: test_rota_url_utiliza_view_index (animais.tests.test_urls.AnimaisURLSTestCase)
Teste se a home da aplicação utiliza a função index da view
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/leandro/Desktop/django_tdd-aula_3/animais/tests/test_urls.py", line 16, in test_rota_url_utiliza_view_index
response = index(request)
File "/home/leandro/Desktop/django_tdd-aula_3/animais/views.py", line 5, in index
return render(request, 'index.html')
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/django/template/loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: index.html
======================================================================
ERROR: test_buscando_um_novo_animal (setup.tests.AnimaisTestCase)
Teste se um usuário encontra um animal pesquisando
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/leandro/Desktop/django_tdd-aula_3/setup/tests.py", line 22, in test_buscando_um_novo_animal
brand_element = self.browser.find_element_by_css_selector('.navbar')
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 808, in find_element_by_css_selector
return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "/home/leandro/Desktop/django_tdd-aula_3/TDD/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".navbar"}
(Session info: chrome=96.0.4664.45)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 5.11.0-41-generic x86_64)
----------------------------------------------------------------------
Ran 2 tests in 2.034s
FAILED (errors=2)
Destroying test database for alias 'default'...