We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code from https://youtu.be/L5jWFU2sVXQ
pytest.ini
[pytest] DJANGO_SETTINGS_MODULE = mysite.settings python_files = tests.py test_*.py *_tests.py filterwarnings = ignore::django.utils.deprecation.RemovedInDjango50Warning
tests/test_blog.py (ran black after recording):
black
import pytest from blog.views import blog_list from blog.models import Blog @pytest.fixture def blog_entry(db): return Blog.objects.create( title="Test Blog", post="Test Body", slug="test-blog", cover="test.jpg", added="2019-01-01", edited="2019-01-01", ) def test_blog_list(client, blog_entry): ret = client.get("/") assert ret.status_code == 200 assert list(ret.context["posts"]) == [blog_entry] ``
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code from https://youtu.be/L5jWFU2sVXQ
pytest.ini
tests/test_blog.py (ran
black
after recording):The text was updated successfully, but these errors were encountered: