fix: fix gas urls, bump version 0.8.9
This commit is contained in:
		
							parent
							
								
									6f2895253b
								
							
						
					
					
						commit
						4d82c76fbd
					
				| 
						 | 
					@ -1,6 +1,11 @@
 | 
				
			||||||
Changelog
 | 
					Changelog
 | 
				
			||||||
=========
 | 
					=========
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					0.8.9
 | 
				
			||||||
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Bugfix
 | 
				
			||||||
 | 
					
 | 
				
			||||||
0.8.8
 | 
					0.8.8
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ class GASSite:
 | 
				
			||||||
        for prefix, urls in self._registry['urls'].items():
 | 
					        for prefix, urls in self._registry['urls'].items():
 | 
				
			||||||
            if prefix:
 | 
					            if prefix:
 | 
				
			||||||
                urlpatterns.append(
 | 
					                urlpatterns.append(
 | 
				
			||||||
                    re_path(r'^{prefix}/', include(urls)),
 | 
					                    re_path(f'^{prefix}/', include(urls)),
 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                urlpatterns.append(
 | 
					                urlpatterns.append(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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)
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
[metadata]
 | 
					[metadata]
 | 
				
			||||||
name = django-gas
 | 
					name = django-gas
 | 
				
			||||||
version = 0.8.8
 | 
					version = 0.8.9
 | 
				
			||||||
description = An alternative to django admin
 | 
					description = An alternative to django admin
 | 
				
			||||||
long_description = file: readme.md, changelog.md, collaborators.md
 | 
					long_description = file: readme.md, changelog.md, collaborators.md
 | 
				
			||||||
long_description_content_type = text/markdown
 | 
					long_description_content_type = text/markdown
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue