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