예제 #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()
예제 #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()
예제 #3
0
    def test_is_properly_configured_missing_data(self):
        config = self.create_settings()
        config['oauth_token'] = None

        assert not is_properly_configured(config)
예제 #4
0
 def test_is_properly_configured(self):
     assert is_properly_configured(self.create_settings())
예제 #5
0
    def test_is_properly_configured_missing_data(self):
        config = self.create_settings()
        config['oauth_token'] = None

        assert not is_properly_configured(config)
예제 #6
0
 def test_is_properly_configured(self):
     assert is_properly_configured(self.create_settings())