Esempio n. 1
0
    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': '******',
        }
Esempio n. 2
0
    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,
        }
Esempio n. 3
0
    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,

        }