def test_missing_auth_credentials(self):
self.heartbeat['auth'] = {'blow': 'fish'}
with pytest.raises(ImproperlyConfigured) as e:
request = self.factory.get(reverse('1337'))
details(request)
msg = ('Username or password missing from auth configuration '
'for heartbeat')
assert msg == str(e.value)
评论列表
文章目录