Feat: packaging (#127)

- Add configuration files for packaging
- Precommit now uses ruff

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#127
This commit is contained in:
Thomas Kairos
2023-10-11 10:58:34 +02:00
parent 5ea092dba6
commit f7a61fe6c0
82 changed files with 332 additions and 935 deletions

View File

@ -23,16 +23,12 @@ class FakeView:
@pytest.fixture
def published_pages():
return baker.make(
models.Page, status=models.StaticPage.STATUS_PUBLISHED, _quantity=3
)
return baker.make(models.Page, status=models.StaticPage.STATUS_PUBLISHED, _quantity=3)
@pytest.fixture
def unpublished_pages():
return baker.make(
models.Page, status=models.StaticPage.STATUS_DRAFT, _quantity=3
)
return baker.make(models.Page, status=models.StaticPage.STATUS_DRAFT, _quantity=3)
@pytest.fixture

View File

@ -96,9 +96,7 @@ class TestParentMixin:
@pytest.mark.django_db
def test_get_parent_raises_404(self, parent_mixin):
with pytest.raises(Http404):
parent_mixin.get_parent(
self.req, parent_slug="parent-invalid-slug"
)
parent_mixin.get_parent(self.req, parent_slug="parent-invalid-slug")
def test_get_parent_not_parent_model(self, parent_mixin):
parent_mixin.parent_model = None