- Jul 28, 2021
-
-
Tore.Brede authored
-
Tore.Brede authored
-
- Jul 27, 2021
-
-
Tore.Brede authored
greg.tests: migrate to pytest test runner See merge request !11
-
Deaktivert bruker authored
Duplicated code is not a problem in itself. Fixes: GREG-14
-
Deaktivert bruker authored
It becomes quite hard not to do this in Django, because a lot of the imports share similar names to local symbol names. Fixes: GREG-14
-
Deaktivert bruker authored
Fixes: GREG-14
-
Deaktivert bruker authored
Fixes: GREG-14
-
Deaktivert bruker authored
Fixes: GREG-14
-
Deaktivert bruker authored
This is a first stab at converting the tests for the Person model to pytest. It is more than likely that we will want to create shared fixtures for these in the future. Fixes: GREG-14
-
Deaktivert bruker authored
Creates a new module namespace greg.tests.api that for now contains a single test, test_person. Fixes: GREG-14
-
Deaktivert bruker authored
Literal translation of greg/tests/test_api_person.py into pytest style. This could certainly be improved. Fixes: GREG-14
-
Deaktivert bruker authored
The faker module spams the logs from test runs with needless messages such as these: INFO:faker.factory:Provider `faker.providers.address` has been localized to `en_US`. INFO:faker.factory:Provider `faker.providers.automotive` has been localized to `en_US`. WARNING:faker.factory:Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider. By lowering the test logging verbosity of this module in pytest's conftests.py, we silence these. Fixes: GREG-14
-
Deaktivert bruker authored
The Django configuration expects a static directory to be present on the file system, otherwise the tests will output a warning. This adds an empty directory using the clever git trick of ignoring everything within the directory except the .gitignore file itself. This silences a warning during the test run. Fixes: GREG-14
-
Deaktivert bruker authored
django.conf.urls.url has been deprecated in favour of django.urls.re_path, which has matching behaviour. This silences two warnings during the test run. Fixes: GREG-14
-
Deaktivert bruker authored
ugettext_lazy has been deprecated in favour of gettext_lazy. This silences a deprecation warning outputted during test runs. Fixes: GREG-14
-
Deaktivert bruker authored
Automatic commit from "poetry add --dev pytest-django" based on 5d52c80d. Fixes: GREG-14
-
Deaktivert bruker authored
Pytest understands unittest-styled tests, so there is no immediate need to update the test files themselves to a pytest idiomatic syntax. Fixes: GREG-14
-
- Jul 16, 2021
-
-
Tore.Brede authored
Removing constraint on PersonRole See merge request !7
-
Tore.Brede authored
build: introduce pylint, pyproject.toml, and formatting lints See merge request !8
-
- Jul 15, 2021
-
-
Deaktivert bruker authored
PersonTestData.setUp() calls super().setUp(), but this is only available on GregAPITestCase. This only works at runtime because PersonTestData and GregAPITestCase is composed together with multi-inheritance as part of PersonAPITestCase. This change is obviously not ideal, but we will change it soon when introducing pytest anyway. This is just to get the lints passing. Fixes: GREG-16
-
Deaktivert bruker authored
-
Deaktivert bruker authored
As reported by pylint. Fixes: GREG-16
-
Deaktivert bruker authored
As reported by pylint. Fixes: GREG-16
-
Deaktivert bruker authored
-
Deaktivert bruker authored
All reported by pylint. Fixes: GREG-16
-
Deaktivert bruker authored
Fixes: GREG-16
-
Deaktivert bruker authored
Fixes: GREG-16
-
Deaktivert bruker authored
Some of the lint checks disabled in this patch should possibly be re-enabled, but this is what is necessary to get the lints passing on the current state of the source code without too much trouble. Fixes: GREG-16
-
Deaktivert bruker authored
Pylint analyses the code for common bugs. Fixes: GREG-16
-
Deaktivert bruker authored
We use black, the uncompromising Python code formatter. This means we have no need for autopep8. Fixes: GREG-16
-
Deaktivert bruker authored
"make fmt" can now be invoked to auto-format Python code. Fixes: GREG-16
-
Deaktivert bruker authored
Use black to check if the code is well-formatted and fail if it is not. Fixes: GREG-16
-
Deaktivert bruker authored
Introduce a new lint task invoked through "make lint". It currently only lints the Poetry configuration. The lint task is ran as part of the continuous integration pipeline. Fixes: GREG-16
-
Tore.Brede authored
-
Tore.Brede authored
build: set default target to test See merge request !6
-
Deaktivert bruker authored
A Makefile's default target is either the one defined by "all", or in the absence of an "all" target, the first target found in the file. This means the current default target is to clean the venv from disk. This patch makes calling make non-destructive by redefining the default target to run the tests. We may want to change this in future to something more appropriate. Fixes: GREG-13
-
Deaktivert bruker authored
build: set up a continuous integration pipeline for tests See merge request !5
-
Deaktivert bruker authored
Fixes: GREG-15
-
Deaktivert bruker authored
Automatic commit from "poetry update" based on 63c09a3. Fixes: GREG-15
-
Deaktivert bruker authored
Apparently pka-context-manager is mirrored on UiB's GitLab instance. Picking it up from there makes a great deal of sense, otherwise the CI test pipeline will fail because it does not have access to USIT's Bitbucket instance. Fixes: GREG-15
-