Skip to content

Commit

Permalink
test permissions config
Browse files Browse the repository at this point in the history
  • Loading branch information
meejah committed Aug 31, 2022
1 parent 2eb38a8 commit 17bece3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/wormhole_mailbox_server/test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,16 @@ def test_string(self):
self.assertIn("--blur-usage=", s)
self.assertIn("round logged access times to improve privacy", s)

def test_permissions_valid(self):
o = server_tap.Options()
o.parseOptions([
"--permissions", "none",
])
self.assertEquals(o["permissions"], "none")

def test_permissions_invalid(self):
o = server_tap.Options()
with self.assertRaises(UsageError):
o.parseOptions([
"--permissions", "an invalid permission method",
])

0 comments on commit 17bece3

Please sign in to comment.