Comments (12)
Coverage including branches currently sits at 85%
from portfolio.
This issue is stale since it has been open for 10 days without any activity. If the 'Stale Issue' label hasn't been removed or a comment made on the issue, it will be closed after 5 days of inactivity.
from portfolio.
This issue is stale since it has been open for 10 days without any activity. If the 'Stale Issue' label hasn't been removed or a comment made on the issue, it will be closed after 5 days of inactivity.
from portfolio.
Code coverage currently sits at 88%.
from portfolio.
This issue is stale since it has been open for 10 days without any activity. If the 'Stale Issue' label hasn't been removed or a comment made on the issue, it will be closed after 5 days of inactivity.
from portfolio.
1 failed unit test from commit 9c893c3.
This is an external website link which I have subsequently tested manually. It returns a 200, so I'm happy this is functional.
from portfolio.
1 failed unit test from commit b0f8cc2.
This is the same external website link which I have subsequently tested manually. It returns a 200, so I'm happy this is functional.
If it fails once more, I will remove the link and test.
from portfolio.
The latest thinking around testing for views is that I should use the rf
fixture for testing any GET
views since this facilitates easy parametrized tests for both auth and unauth views.
For POST
requests, it is better to use the client
fixture or even a derived extension of the fixture (see task 2)
Within the conftest.py
, make the following changes:
-
Change any references to
get_user_model()
todjango_user_model
fixture -
Create a fixture similar to
auth_user
but instead of returning aUser
object, return aclient
object that is authenticated. Name this new fixtureauth_client
.POST
request views should be tested with totally separate tests. This approach exposes more methods where I can assert on response content, response url, response's template, redirect_chain, etc.
There is also a marker to be aware of which could help tests run that are falsely failing due to a failing template variable.
@pytest.mark.ignore_template_errors
Additions of the following django_assert_max_num_queries
fixture/assertion could enable me to maintain that my queries are not increasing in number and therefore reducing the speed of my application.
from portfolio.
Previously, I had an issue running tests with pytest-xdist
. I thought it was something to do with me running my tests within a Docker container, however after reading the CHANGELOG
which said:
v3.10.0 (2020-08-25)
Improvements
- Officialy support Django 3.1
- Preliminary supoprt for upcoming Django 3.2
- Support for pytest-xdist 2.0
I can use pytest-xdist with many processors. With optimisations in my tests, I can now run a test suite a 448 tests in 42 seconds.
Run with -n 0
flag if running a small suite and the setup would take longer. This essentially disables pytest-xdist
.
from portfolio.
This issue is stale since it has been open for 10 days without any activity. If the 'Stale Issue' label hasn't been removed or a comment made on the issue, it will be closed after 5 days of inactivity.
from portfolio.
The GitHub Action for the testing needs to be configured. The tests are running and passing which do not require the database, however the tests seemingly don't have the proper authentication for the test Postgres database. It seems that the environment variables are not set up correctly.
from portfolio.
This issue is stale since it has been open for 10 days without any activity. If the 'Stale Issue' label hasn't been removed or a comment made on the issue, it will be closed after 5 days of inactivity.
from portfolio.
Related Issues (20)
- Replace Requests Package with HTTPX HOT 1
- Two-Factor Authentication HOT 12
- Post Development Plan
- Change Display of Email Address on Contact Page
- Refactor Signals File in Users App HOT 1
- Django Axes
- Replace Pipenv with Poetry
- Remove Google Analytics
- Unit Tests: Mixins
- Scraping: Styling and Layout Changes
- Text Analysis: Styling and Layout Changes
- Countdown Letters: Styling and Layout Changes
- Countdown Numbers: Styling and Layout Changes
- Roulette: Styling and Layout Changes
- Home Page Amendments
- Change Docker Build
- Upgrade to GitHub Forms for Issues Creation
- Develop Index Page HOT 2
- Blockquote on Blog Post not Displaying Correctly HOT 2
- 2FA Integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portfolio.