fix: fix gas urls, bump version 0.8.9

This commit is contained in:
Ales (Shagi) Zabala Alava 2023-10-26 16:13:00 +02:00
parent 6f2895253b
commit 4d82c76fbd
4 changed files with 37 additions and 2 deletions

View File

@ -1,6 +1,11 @@
Changelog
=========
0.8.9
-----
* Bugfix
0.8.8
-----

View File

@ -86,7 +86,7 @@ class GASSite:
for prefix, urls in self._registry['urls'].items():
if prefix:
urlpatterns.append(
re_path(r'^{prefix}/', include(urls)),
re_path(f'^{prefix}/', include(urls)),
)
else:
urlpatterns.append(

View File

@ -0,0 +1,30 @@
from django.test import TestCase, Client
from django.urls import reverse
from model_bakery import baker
from gas.gas.core.views import GASLoginView
class GASLoginTestCase(TestCase):
def test_load(self):
client = Client()
response = client.get(reverse('gas:login'))
self.assertEqual(response.status_code, 200)
class IndexTestCase(TestCase):
def test_load(self):
admin_user = baker.make(
'auth.User',
username='admin',
is_superuser=True,
)
client = Client()
response = client.get(reverse('gas:index'))
self.assertEqual(response.status_code, 302)
client.force_login(admin_user)
response = client.get(reverse('gas:index'))
self.assertEqual(response.status_code, 200)

View File

@ -1,6 +1,6 @@
[metadata]
name = django-gas
version = 0.8.8
version = 0.8.9
description = An alternative to django admin
long_description = file: readme.md, changelog.md, collaborators.md
long_description_content_type = text/markdown