def test_combined(self): fake_config = ( "api_token: foobar\n" "auth_key: ~/.ssh/foo\n" "auth_key_name: foo" ).encode('UTF-8') _open.side_effect = lambda *args, **kwargs: io.BytesIO(fake_config) assert configure.combined() == { 'api_token': 'foobar', 'auth_key': '~/.ssh/foo', 'auth_key_name': 'foo', 'username': '******', }
def test_combined(self): fake_config = ("client_id: foo\n" "api_key: bar\n" "auth_key: ~/.ssh/foo\n" "auth_key_name: foo").encode('UTF-8') _open.side_effect = lambda *args, **kwargs: io.BytesIO(fake_config) assert configure.combined() == { 'client_id': 'foo', 'api_key': 'bar', 'auth_key': '~/.ssh/foo', 'auth_key_name': 'foo', 'username': '******', 'scrub_data': True, }
def test_combined(self): fake_config = ( "client_id: foo\n" "api_key: bar\n" "auth_key: ~/.ssh/foo\n" "auth_key_name: foo" ).encode('UTF-8') _open.side_effect = lambda *args, **kwargs: io.BytesIO(fake_config) assert configure.combined() == { 'client_id': 'foo', 'api_key': 'bar', 'auth_key': '~/.ssh/foo', 'auth_key_name': 'foo', 'username': '******', 'scrub_data': True, }