mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 00:46:05 +00:00
fix(instances): guard mutations and refresh lists after sync
This commit is contained in:
parent
2cdf5dfca1
commit
73d8fd71fb
7 changed files with 741 additions and 207 deletions
|
|
@ -46,10 +46,10 @@ class SetRootPassTestCase(TestCase):
|
|||
# SHA-512 crypt starts with $6$kgPoiREy$
|
||||
self.assertTrue(data["passwd"].startswith("$6$kgPoiREy$"))
|
||||
|
||||
def test_set_root_pass_get_redirects(self):
|
||||
def test_set_root_pass_get_not_allowed(self):
|
||||
response = self.client.get(reverse("instances:rootpasswd", args=[self.instance.id]))
|
||||
self.assertEqual(response.status_code, 302)
|
||||
self.assertEqual(response.status_code, 405)
|
||||
|
||||
def test_set_root_pass_not_found(self):
|
||||
response = self.client.get(reverse("instances:rootpasswd", args=[99999]))
|
||||
response = self.client.post(reverse("instances:rootpasswd", args=[99999]), {"passwd": "secret"})
|
||||
self.assertEqual(response.status_code, 404)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue