Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(10)  |  Derive(0)  |  Import(1)

src/d/j/django-bluebird-HEAD/bluebird/tests/backends.py   django-bluebird(Download)
from ..managers import TwitterIdentificationManager
from ..models import TwitterConsumer, TwitterIdentification, TwitterProfile
from ..backends import TwitterAuthBackend
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
    def test_init_initializes_correctly(self):
        random_twitter_manager = RANDOM()
        random_consumer_class = RANDOM()
        random_api_class = RANDOM()
        tb = TwitterAuthBackend(random_consumer_class, random_twitter_manager, random_api_class)
    def test_authenticate_returns_none_on_bad_credentials(self):
        bad_credentials = { RANDOMSTR(): RANDOM() }
        tb = TwitterAuthBackend()
        results = tb.authenticate(**bad_credentials)
        self.assertEqual(results, None)
            'twitter_request':MockRequest()
        }
        tb = TwitterAuthBackend()
        results = tb.authenticate(**credentials)
        self.assertEqual(results, None)
            'twitter_request':MockRequest()
        }
        tb = TwitterAuthBackend()
        results = tb.authenticate(**credentials)
        self.assertEqual(results, None)