Ejemplo n.º 1
0
 def setUp(self):
     self.user, pwd = create_user()
     self.client = TClient()
     wrong_pwd = pwd + '1234'
     self.extra = {
         'HTTP_AUTHORIZATION': create_auth_string(self.user.username, wrong_pwd)
     }
Ejemplo n.º 2
0
    def setUp(self):
        self.user, pwd = create_user()
        self.podcast_url = "http://example.com/podcast.rss"
        self.episode_url = "http://example.com/podcast/episode-1.mp3"
        self.uid = "client-uid"
        self.podcast = Podcast.objects.get_or_create_for_url(
            self.podcast_url).object

        self.episode = Episode.objects.get_or_create_for_url(
            self.podcast, self.episode_url).object

        self.user_client = Client.objects.create(id=uuid.uuid1(),
                                                 user=self.user,
                                                 uid=self.uid)
        self.client = TClient()
        self.extra = {
            "HTTP_AUTHORIZATION": create_auth_string(self.user.username, pwd)
        }