Ejemplo n.º 1
0
def test_is_properly_configured():
    settings.TWITTER_CONSUMER_KEY = 'foo'
    settings.TWITTER_CONSUMER_SECRET = 'foo'
    settings.TWITTER_OAUTH_TOKEN = 'foo'
    settings.TWITTER_OAUTH_TOKEN_SECRET = 'foo'

    assert twitter.is_properly_configured()

    settings.TWITTER_CONSUMER_KEY = ''
    assert not twitter.is_properly_configured()

    delattr(settings, 'TWITTER_CONSUMER_KEY')
    assert not twitter.is_properly_configured()
Ejemplo n.º 2
0
def test_is_properly_configured():
    settings.TWITTER_CONSUMER_KEY = 'foo'
    settings.TWITTER_CONSUMER_SECRET = 'foo'
    settings.TWITTER_OAUTH_TOKEN = 'foo'
    settings.TWITTER_OAUTH_TOKEN_SECRET = 'foo'

    assert twitter.is_properly_configured()

    settings.TWITTER_CONSUMER_KEY = ''
    assert not twitter.is_properly_configured()

    delattr(settings, 'TWITTER_CONSUMER_KEY')
    assert not twitter.is_properly_configured()
Ejemplo n.º 3
0
    def test_is_properly_configured_missing_data(self):
        config = self.create_settings()
        config['oauth_token'] = None

        assert not is_properly_configured(config)
Ejemplo n.º 4
0
 def test_is_properly_configured(self):
     assert is_properly_configured(self.create_settings())
Ejemplo n.º 5
0
    def test_is_properly_configured_missing_data(self):
        config = self.create_settings()
        config['oauth_token'] = None

        assert not is_properly_configured(config)
Ejemplo n.º 6
0
 def test_is_properly_configured(self):
     assert is_properly_configured(self.create_settings())