我正在尝试测试这个网址,但我不知道该怎么做,我有以下代码,但它不起作用
# Method of the test
def testViewDeleteUserIsResolved(self):
url = reverse('inventory:viewDeleteUser', args={'idUser': tbUser.objects.first().id})
self.assertEquals(resolve(url).func,viewDeleteUser)
# Url to try
path('viewDeleteUser/?P<idUser>[0-9a-f-]+', views.viewDeleteUser, name='viewDeleteUser'),
SMILET
精慕HU
相关分类