def test_instance_denied_allow_some(self, resources_mock): self.assertFalse(main.instance_denied(identity='a'))
def test_instance_denied_disallow_some(self, resources_mock): self.assertTrue(main.instance_denied(identity='b'))
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'))
def test_instance_denied_disallow_some(self): self.assertTrue(main.instance_denied(identity='b'))
def test_instance_denied_allow_some(self): self.assertFalse(main.instance_denied(identity='a'))
def test_instance_denied_disallow_all(self, driver_mock): self.assertTrue(main.instance_denied(identity='a'))
def test_instance_denied_allow_all(self, driver_mock): self.assertFalse(main.instance_denied(identity='x'))