예제 #1
0
def main(argv=None):
    """Forget credentials for Ubuntu One SSO."""
    argv = argv if argv else []
    docopt(__doc__, argv=argv)

    logger.info('Clearing credentials for Ubuntu One SSO.')
    clear_config()
    logger.info('Credentials cleared.')
예제 #2
0
    def test_clear_config_with_no_existing_file(self):
        config = load_config()
        assert config == {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #3
0
    def test_clear_config_with_no_existing_file(self):
        config = load_config()
        assert config == {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #4
0
def main(argv=None):
    """Forget credentials for Ubuntu One SSO."""
    argv = argv if argv else []
    docopt(__doc__, argv=argv)

    logger.info('Clearing credentials for Ubuntu One SSO.')
    clear_config()
    logger.info('Credentials cleared.')
예제 #5
0
    def test_clear_config_removes_existing_section(self):
        cfg = ConfigParser()
        cfg.add_section('login.ubuntu.com')
        cfg.set('login.ubuntu.com', 'foo', '1')
        with open(self.filename, 'w') as fd:
            cfg.write(fd)

        config = load_config()
        assert config != {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #6
0
    def test_clear_config_with_no_existing_section(self):
        cfg = ConfigParser()
        cfg.add_section('some.domain')
        cfg.set('some.domain', 'foo', '1')
        with open(self.filename, 'w') as fd:
            cfg.write(fd)

        config = load_config()
        assert config == {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #7
0
    def test_clear_config_removes_existing_section(self):
        cfg = ConfigParser()
        cfg.add_section('login.ubuntu.com')
        cfg.set('login.ubuntu.com', 'foo', '1')
        with open(self.filename, 'w') as fd:
            cfg.write(fd)

        config = load_config()
        assert config != {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #8
0
    def test_clear_config_with_no_existing_section(self):
        cfg = ConfigParser()
        cfg.add_section('some.domain')
        cfg.set('some.domain', 'foo', '1')
        with open(self.filename, 'w') as fd:
            cfg.write(fd)

        config = load_config()
        assert config == {}

        clear_config()

        config = load_config()
        self.assertEqual(config, {})
예제 #9
0
파일: _store.py 프로젝트: fallen/snapcraft
def logout():
    logger.info("Clearing credentials for Ubuntu One SSO.")
    clear_config()
    logger.info("Credentials cleared.")
예제 #10
0
def logout():
    logger.info('Clearing credentials for Ubuntu One SSO.')
    clear_config()
    logger.info('Credentials cleared.')