Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[run]
branch = True
; the below plugin will check test coverage of our templates also. Currently
; disabled
; plugins = django_coverage_plugin
; source= .
omit =
htmlcov/*
*/migrations/*
*/tests/*
*/static/*
manage.py
myblog/asgi.py
myblog/wsgi.py
[report]
show_missing = True
skip_covered = True
; fail_under = 100

[django_coverage_plugin]
template_extensions = html
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* ~~Responsive menu, replace the sidebar for smaller screens.~~ `DONE`
* Comments - `Basic functionality complete`
* Tags - `Basic functionality complete`
* Add 'Category' functionality to categorise posts under specific categorise and
allow to sort/list by same.
* Sidebar - `Basic functionality complete`. Sections need more coding as the
relevant functionality is written.
* API to read / post Blog Posts and Comments, allowing a completely separate
Expand Down
3 changes: 0 additions & 3 deletions blog/tests.py

This file was deleted.

Empty file added blog/tests/__init__.py
Empty file.
1 change: 1 addition & 0 deletions blog/tests/test_blog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Unit tests for the Blog Model."""
1 change: 1 addition & 0 deletions blog/tests/test_comment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Unit tests for the Comment Model."""
1 change: 1 addition & 0 deletions blog/tests/test_tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Unit tests for the Tag Model."""
2 changes: 1 addition & 1 deletion myblog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@

# set a SITE_ID, due to the (3rd party) 'preferences' app using the sites
# functionality. long term, rewrite the addon to remove this need.
SITE_ID = 2
SITE_ID = 1


X_FRAME_OPTIONS = "SAMEORIGIN"
Expand Down
12 changes: 12 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[pytest]
DJANGO_SETTINGS_MODULE = myblog.settings
addopts =
; --exitfirst
--reuse-db
--assert=plain
--tb short
; --cov
--cov-report html
filterwarnings =
ignore::django.utils.deprecation.RemovedInDjango40Warning
ignore::django.utils.deprecation.RemovedInDjango41Warning
41 changes: 28 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
django>=3.2.6,<3.3.0
ipython>=7.27.0,<7.29.0
pillow>=8.3.1,<8.5.0
djangorestframework>=3.12.4,<3.13.0
django-preferences>=1.0.0,<1.1.0
django-doctor>=2.6.0,<2.7.0
django-gravatar2>=1.4.4,<1.5.0
dj-pagination>=2.5.0,<2.6.0
dj-hitcount>=1.1.0,<1.2.0
django-ckeditor>=6.1.0,<6.2.0
django-gravatar2>=1.4.4,<1.5.0
django-likes>=2.0.1,<2.1.0
django-maintenance-mode>=0.16.1,<0.17.0
django-preferences>=1.0.0,<1.1.0
django-secretballot>=2.0.0,<2.1.0
django-likes>=2.0.1,<2.1.0
python-dotenv>=0.19.1,<0.20.0
gunicorn>=20.1.0,<20.2.0
psycopg2>=2.9.1,<2.10.0
django-user-sessions>=1.7.1,<1.8.0
geoip2>=4.4.0,<4.5.0
django-xforwardedfor-middleware==2.0
djangorestframework>=3.12.4,<3.13.0
dj-hitcount>=1.1.0,<1.2.0
dj-pagination>=2.5.0,<2.6.0
geoip2>=4.4.0,<4.5.0
pillow>=8.3.1,<8.5.0
python-dotenv>=0.19.1,<0.20.0
psycopg2>=2.9.1,<2.10.0

# production runner
gunicorn>=20.1.0,<20.2.0

# profiling and checking
newrelic>=7.2.2,<7.3.0
django-doctor>=2.6.0,<2.7.0

#testing
pytest>=6.2.5,<6.3.0
django-pytest>=0.2.0,<0.3.0
pytest-randomly>=3.10.1,<3.11.0
pytest-reverse>=1.3.0,<1.4.0
pytest-xdist>=2.4.0,<2.5.0
pytest-cov>=3.0.0,<3.1.0
pytest-sugar>=0.9.4,<0.10.0

# command line shell improvement
ipython>=7.29.0,<7.30.0
3 changes: 0 additions & 3 deletions users/tests.py

This file was deleted.

1 change: 1 addition & 0 deletions users/tests/test_profile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Until tests for the Profile Model."""