Browse Source

before this test, verify was unneeded..

main
John-Mark Gurney 5 years ago
parent
commit
42eb9220d9
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      ui/server.py

+ 9
- 0
ui/server.py View File

@@ -124,6 +124,15 @@ class _TestCases(unittest.TestCase):
r = self.requests.put('/store', data=persona.get_identity().encode()) r = self.requests.put('/store', data=persona.get_identity().encode())
self.assertEqual(r.status_code, 201) self.assertEqual(r.status_code, 201)


# that an object with a bad signature
badsigobj = persona.get_identity().new_version()

# when stored
r = self.requests.put('/store', data=badsigobj.encode())

# is rejected
self.assertEqual(r.status_code, 401)

# that when stored # that when stored
self.medaserver.store() self.medaserver.store()




Loading…
Cancel
Save