diff --git a/core/TESTS/test_urls.py b/core/TESTS/test_urls.py index df34ee6..7af8efc 100644 --- a/core/TESTS/test_urls.py +++ b/core/TESTS/test_urls.py @@ -6,6 +6,16 @@ so any path that relies on data being in the database will fail. https://docs.djangoproject.com/en/dev/topics/testing/tools/ +We are not using +https://github.com/FactoryBoy/factory_boy +because we are trying to minimise the number of 3rd-party packages because they expose us to update hell, +as experience in 2019-2020. +However we could use +https://docs.python.org/dev/library/unittest.mock.html +as this is now part if python - if we can get our heads around it. + +The tests in this file: + The code {% url THING %} or {% url THING PARAMETER %} appears a hundred times or more in the troggle/templates/ HTML template files. This is the template synstax for reverse('THING') @@ -18,6 +28,8 @@ parameters should be fine as this is fundamental Django stuff which will have be But the reverse() function is purely syntactical, the PARAMETER is just a string which is applied to the url. So this is not testing anything important really. See the test_url_threed() below. +These url lines all come from templates/*.html + 1. No tests: No parameters {% url "caveindex" %}