def test_choose_devhub(self, Command):
        mock_keychain = mock.Mock()
        mock_keychain.get_service.return_value = ServiceConfig(
            {"username": "******"})
        config = ScratchOrgConfig({}, "test", mock_keychain)

        assert config._choose_devhub() == "*****@*****.**"
Exemple #2
0
    def test_choose_devhub__service_not_configured(self, Command):
        mock_keychain = mock.Mock()
        mock_keychain.get_service.side_effect = ServiceNotConfigured
        config = ScratchOrgConfig({}, "test")
        config.keychain = mock_keychain

        assert config._choose_devhub() is None