mirror of
				https://github.com/cookiecutter/cookiecutter-django.git
				synced 2025-11-04 01:47:28 +03:00 
			
		
		
		
	Merge pull request #2874 from pydanny/mypy-django-stubs
Update mypy and django-stubs
This commit is contained in:
		
						commit
						a5ab4ae1cb
					
				| 
						 | 
				
			
			@ -13,8 +13,8 @@ watchgod==0.6  # https://github.com/samuelcolvin/watchgod
 | 
			
		|||
 | 
			
		||||
# Testing
 | 
			
		||||
# ------------------------------------------------------------------------------
 | 
			
		||||
mypy==0.770  # https://github.com/python/mypy
 | 
			
		||||
django-stubs==1.5.0  # https://github.com/typeddjango/django-stubs
 | 
			
		||||
mypy==0.782  # https://github.com/python/mypy
 | 
			
		||||
django-stubs==1.6.0  # https://github.com/typeddjango/django-stubs
 | 
			
		||||
pytest==6.1.0  # https://github.com/pytest-dev/pytest
 | 
			
		||||
pytest-sugar==0.9.4  # https://github.com/Frozenball/pytest-sugar
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,8 @@ class UserAdmin(auth_admin.UserAdmin):
 | 
			
		|||
 | 
			
		||||
    form = UserChangeForm
 | 
			
		||||
    add_form = UserCreationForm
 | 
			
		||||
    fieldsets = (("User", {"fields": ("name",)}),) + auth_admin.UserAdmin.fieldsets
 | 
			
		||||
    fieldsets = (("User", {"fields": ("name",)}),) + tuple(
 | 
			
		||||
        auth_admin.UserAdmin.fieldsets
 | 
			
		||||
    )
 | 
			
		||||
    list_display = ["username", "name", "is_superuser"]
 | 
			
		||||
    search_fields = ["name"]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -64,7 +64,7 @@ class TestUserDetailView:
 | 
			
		|||
 | 
			
		||||
    def test_not_authenticated(self, user: User, rf: RequestFactory):
 | 
			
		||||
        request = rf.get("/fake-url/")
 | 
			
		||||
        request.user = AnonymousUser()  # type: ignore
 | 
			
		||||
        request.user = AnonymousUser()
 | 
			
		||||
 | 
			
		||||
        response = user_detail_view(request, username=user.username)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user