| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
|\ |
|
| |\
| | |
| | | |
Add pipenv run start command
|
| | | |
|
| |/ |
|
| |\
| | |
| | | |
Allauth improvements & GH
|
| | |\
| | |/
| |/| |
|
| | |\ |
|
| | |\ \ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | |\ \ \ |
|
| | | | | | |
|
| | |\ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This sets both the Django User's `username` and `first_name` params.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: Sebastiaan Zeeff <[email protected]>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This remove a warning during test run
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|\| | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Validation for active infractions
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Since other pull requests were merged that also included migrations
for the API app, this PR needed to be updated to avoid conflicts in
the migration history. In addition, the test files contained names of
specific migration files that needed to be updated to the correct
names after the merge resolution.
|
| | |\ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
|
| |\ \ \ \ \ \ \
| | |_|_|_|_|_|/
| |/| | | | | | |
Update dependency pinning
|
| | |\ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Add new rules.
|
| |/ / / / / / / |
|
| | | |/ / / /
| | |/| | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The `test_returns_400_for_active_infractions_of_type_that_cannot_be_
active` test relied on the order in which the validation was done
since it contained incompatible combinations of arguments. The test
has been changed to make sure the data is valid except for the thing
we actually want to test.
I have also tried to improve the name of the test that tests the
`test_unique_constraint_accepts_active_infraction_after_inactive_
infraction` test. It now includes the logic of what it does, but
not the entire name of the test it's testing.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The last two lines in the docstring of `InfractionFactory` in the
`test_active_infraction_migration.py` file were overindented by one
space. I've removed the space.
The docstring of the `test_loader_build_graph_gets_called_once`
method in the `MigrationsTestCaseNoSideEffectsTests` calss of the
`test_base.py` file was missing two words. Corrected.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
https://github.com/python-discord/site/pull/278
This commit applies the feedback given to PR #278. I have made a
number of significant changes:
- I have added tests for the `MigrationsTestCase` class, including a
test to see if the test case travels to the specified points in the
migration history.
- The dictionary of infracted users in the active migration tests now
uses informative strings as keys. This makes it easier to relate a
specific test to the data it's testing.
- I have simplified the migration query logic by replacing unneeded Q
objects by simpler keyword arguments to `filter` method calls.
- I have removed the custom validation logic for allowing only one
active infraction of a given type per user and replaced it by a
`UniqueTogetherValidator` with a custom validation error message.
- `test_unique_constraint_accepts_active_infraction_after_inactive_
infraction` relied on an Error results instead of a Fail result
to indicate an issue with the database constraint. Since a fail
should lead to a Fail status, I've replaced it by a try-except
block that signals a test failure if an `IntegrityError` was
caught by it.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The migration files were generated and named before the migrations
added by other pull requests. This caused the migration path to
diverge. Since the migrations did not touch the same models, the
solution was to rename the migration files to place them at the end
of the migration history.
|
| | | |\ \ \ \
| | | |/ / / /
| | |/| | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
https://github.com/python-discord/site/issues/273
This commits adds a UniqueConstraint for active infractions on a
combination of the `user` and `type` field. This means that a user
can only have one active infraction of a given type in the database
at any time.
I've also added tests to make sure that this behaves as expected.
|