Example #1
0
 def test_instance_denied_allow_some(self, resources_mock):
     self.assertFalse(main.instance_denied(identity='a'))
Example #2
0
 def test_instance_denied_disallow_some(self, resources_mock):
     self.assertTrue(main.instance_denied(identity='b'))
Example #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'))
Example #4
0
 def test_instance_denied_disallow_some(self):
     self.assertTrue(main.instance_denied(identity='b'))
Example #5
0
 def test_instance_denied_allow_some(self):
     self.assertFalse(main.instance_denied(identity='a'))
Example #6
0
 def test_instance_denied_disallow_all(self, driver_mock):
     self.assertTrue(main.instance_denied(identity='a'))
Example #7
0
 def test_instance_denied_allow_all(self, driver_mock):
     self.assertFalse(main.instance_denied(identity='x'))