示例#1
0
 def test_instance_denied_allow_some(self, resources_mock):
     self.assertFalse(main.instance_denied(identity='a'))
示例#2
0
 def test_instance_denied_disallow_some(self, resources_mock):
     self.assertTrue(main.instance_denied(identity='b'))
示例#3
0
 def test_instance_denied_undefined_option(self, resources_mock):
     with mock.patch.dict(main.app.config):
         main.app.config.pop('SUSHY_EMULATOR_ALLOWED_INSTANCES', None)
         self.assertFalse(main.instance_denied(identity='a'))
示例#4
0
 def test_instance_denied_disallow_some(self):
     self.assertTrue(main.instance_denied(identity='b'))
示例#5
0
 def test_instance_denied_allow_some(self):
     self.assertFalse(main.instance_denied(identity='a'))
示例#6
0
 def test_instance_denied_disallow_all(self, driver_mock):
     self.assertTrue(main.instance_denied(identity='a'))
示例#7
0
 def test_instance_denied_allow_all(self, driver_mock):
     self.assertFalse(main.instance_denied(identity='x'))