Example #1
0
 def test_get_auth_can_split_user_and_password(self):
     user, password = cli_utils.get_auth('user:password')
     assert user == "user"
     assert password == "password"
Example #2
0
 def test_get_auth_can_split_user_and_password(self):
     user, password = cli_utils.get_auth('user:password')
     assert user == "user"
     assert password == "password"
Example #3
0
    def test_get_auth_can_read_password_from_stdin(self, mocked_getpass):
        cli_utils.get_auth('admin')

        mocked_getpass.assert_called_with(
            'Please enter a password for admin: ')
Example #4
0
    def test_get_auth_can_read_password_from_stdin(self, mocked_getpass):
        cli_utils.get_auth('admin')

        mocked_getpass.assert_called_with(
            'Please enter a password for admin: ')