def test_user_key_must_exist(self):
        app = self.mktemp()
        FilePath(app).touch()
        deploy = self.mktemp()
        FilePath(deploy).touch()
        ca = self.mktemp()
        FilePath(ca).touch()
        user_cert = self.mktemp()
        FilePath(user_cert).touch()
        credential_path = b"/path/to/non-existent-user.key"
        self.options["cacert"] = ca
        self.options["cert"] = user_cert
        self.options["key"] = credential_path
        exception = self.assertRaises(UsageError, self.options.parseOptions,
                                      [CONTROL_HOST, deploy, app])
        expected_message = (
            "File /path/to/non-existent-user.key does not exist. "
            "Use the flocker-ca command to create the credential, "
            "or use the --key flag to specify the credential location."
        )

        self.assertEqual(
            expected_message,
            str(exception)
        )
Test to make sure that after lockout we send to the correct
dataset/ETHPy150Open ClusterHQ/flocker/flocker/cli/test/test_deploy_script.py/DeployOptionsTests.test_user_key_must_exist--crossover with--dataset/ETHPy150Open kencochrane/django-defender/defender/tests.py/AccessAttemptTest.test_failed_login_redirect_to_URL