-
Notifications
You must be signed in to change notification settings - Fork 1
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
Unit Tests #40
Comments
Add unit tests and improve coverage
Add unit tests and improve coverage
Coverage including branches currently sits at 85% |
Capture instances of game being played #40
Capture instances of game being played #40
The update to PyTest >6.0 introduced some breaking changes due to feature deprecations. Unit tests have been re-ran all and have passed. Adds the following functionality: - Updated Pytest to version 6.0.1 + Hypothesis - Amended positional arguments for fixtures to named ones - Amended `pytest.ini` file to remove unknown configuration options - Added docstrings to global `helpers` module See also: #40
The update to PyTest >6.0 introduced some breaking changes due to feature deprecations. Unit tests have been re-ran all and have passed. Adds the following functionality: - Updated Pytest to version 6.0.1 + Hypothesis - Amended positional arguments for fixtures to named ones - Amended `pytest.ini` file to remove unknown configuration options - Added docstrings to global `helpers` module See also: #40
Improve the testing and coverage reporting for the project enabling a more robust build. Adds the following functionality: - Adds a GitHub action that runs the PyTest suite including the generation of a code coverage report - Amends coverage config file to account for code areas that don't require testing - Amends pytest config file to suppress Django deprecation warning - Add codecov.io badge to project's README See also: #40
The GitHub action's build failed on the previous commit because pip couldn't find a `coverall` package. The `coverall` package is no longer required since I'm favouring codecov.io Amends the following: - Removes the requirement for pip to install `coverall` - Adds a command to upgrade pip before installing additional packages See also: #40
The GitHub action's build failed on the previous commit because pip didn't recognise the commands for `django-factoryboy` and `hypothesis` without the preceding `install` keyword. Adds the following: - `install` keyword for the `django-factoryboy` package - `install` keyword for the `hypothesis` package See also: #40
Addresses the following: - Refactors the validations code - Improves docstrings - Increases test coverage with the `validations.py` code - Increases test coverage with the `logic.py` code - Removes unnecessary additional templates - Local test coverage now stands at 93% Develops: #40
Addresses the following: - Removes unnecessary additional templates in Countdown Letters app - Increases test coverage and tests more scenarios with parametrization - Removes a test to an external link that fails on the CI test run. When tested manually, the linked does successfully GET - Local test coverage now stands at 94% Develops: #40
The blog's search feature requires development to be more user-friendly and more presentable. Addresses the following: - Develops search to full word search rather than part of word. This returns less results but more relevant. - Make the search bar full width, removes the search button and adds autofocus to facilitate faster searching. - Removes redundant templates - Renames some templates, views and URL paths to be more reflective of their functionality/featureset - Adds search page with just the search bar - Tweak blog README - Adjusts a few tests for the blog's URLs and views. - Tweaks other pytest config including fixtures and docstrings Develops: #72 Linked Issue: #40
Previously, I had an issue running tests with
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 |
Addresses the following: - Increases test coverage - Adds config for using `pytest-xdist` and speeds up full test suite Develops: #40
Addresses the following: - Update test for looking up invalid word from Oxford Online API within the Countdown Letters Game app Develops: #40
Addresses the following: - Updates font formats in Tiny MCE config - Updates location for default blog image - Updates feeds for posts and categories - Tweaks sitemap - Adds bleach dependency - Updates pytest config Test Issue: #40
Addresses the following: - Abstracts the main logic for all views into a model manager removing repitition in the blog's views - Uses the model manager across the project within the `api`, `blog` and `pages` apps - Adjusts views and template config to remove all duplicate queries for all views - Adjusts `sitemap.py` to account for published model manager - Adjusts `feeds.py` to account for published model manager - Check any failing tests and update any requiring logic changes - Updates the admin to display `id` for the models since I use it in development and don't necessarily want to open the interpreter or DataGrip to see the id/pk all of the time - Adjust manage.py to take advantage of Rich's pretty printing in development config - Tweak Docker config for column width of my screen Tests Issue Ref: #40 Related Issue: #72 Blog Documentation Update: #15
Addresses the following: - Updates database fixtures to use deterministic settings since the testing Postgres database checks for unique key violations - Moves some arrangement logic back into the tests which were previously contained within the fixtures, which in my opinion, was an abstraction too far. This made the AAA pattern of the test itself less obvious - Removes some tests which were not testing the database behaviour that I had originally thought. Switching to Postgres with its strict checking helped uncover these mistaken assumptions - Since email addresses can contain uppercased characters, changed the form's clean method to allow this - Improves some of the docstrings for the tests and fixtures Develops: #40
Ensures the pytest cache is cleared upon a CI test run Ref: #40
* Update Django Debug Toolbar Addresses the following: - Update Django Debug Toolbar to version 3.1.1 - Removes static files from version 2.2 - Collects static from version 3.1.1 * Update project packages and dependencies * Update About Me page Addresses the following: - Improves the copy for the page * Update Rich config Addresses the following: - Adds config to enable a friendly traceback within the terminal which is useful for reading tracebacks more quickly * Add test database for Postgres Addresses the following: - Add a new container to the Docker develpment setup that includes a Postgres database on a `tmpfs` volume for testing purposes - Update Postgres to use version 11.9 (matching Heroku's updated version) - Add `django.contrib.postgres` to installed apps to take advantage of Postgres specific search features #72 * Develop search feature Addresses the following: Adds Postgres specific search functionality which includes: - Cleans unwanted characters and whitespace from user's search input - Uses stemmed keywords - Removes stop words - Adds message if user does not submit any search string - Implements relevancy and search ranking - Removes redundanct model method which returned resultset that can is now obtained from a model manager Some HTML templates have also been tidied up. * Develop users app Addresses the following: - Changes the primary key setup for the Profile model so that it uses the `users` field which is naturally unique because it's the foreign key field on the `auth_user` table and its a one-to-one relationship - Moves the saving of a new profile away from the form - Simplified `ProfileView` by amalgamating functionality of previous `get` and `get_context_data` methods into a single `get_object` method - Removes unrequired `get_success_url` method and uses a `reverse_lazy` implementation instead. Also simplifies testing requirement - Restructures the views to be more logically ordered * Update test suite Addresses the following: - Updates database fixtures to use deterministic settings since the testing Postgres database checks for unique key violations - Moves some arrangement logic back into the tests which were previously contained within the fixtures, which in my opinion, was an abstraction too far. This made the AAA pattern of the test itself less obvious - Removes some tests which were not testing the database behaviour that I had originally thought. Switching to Postgres with its strict checking helped uncover these mistaken assumptions - Since email addresses can contain uppercased characters, changed the form's clean method to allow this - Improves some of the docstrings for the tests and fixtures Develops: #40 * Add cache clear to CI test run Ensures the pytest cache is cleared upon a CI test run Ref: #40
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. |
Attempts the following: - Adds a postgres service to the workflow in an attempt to initialise a Postgres instance using the temporary file system to enable the pytest runner to run the CI tests using Postgres Ref Issue: #40
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. |
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. |
Unit tests need to be written for the project's apps.
The text was updated successfully, but these errors were encountered: