Exemplo n.º 1
0
 def test_token_generation_unicode_key(self):
     member = PendingTeamMember(id=1, team_id=1, email='*****@*****.**')
     with self.Settings(
             SECRET_KEY=
             "\xfc]C\x8a\xd2\x93\x04\x00\x81\xeak\x94\x02H\x1d\xcc&P'q\x12\xa2\xc0\xf2v\x7f\xbb*lX"
     ):
         self.assertEquals(member.token, 'df41d9dfd4ba25d745321e654e15b5d0')
Exemplo n.º 2
0
    def test_send_invite_email(self):
        team = Team(name='test', slug='test', id=1)
        member = PendingTeamMember(id=1, team=team, email='*****@*****.**')
        with self.Settings(SENTRY_URL_PREFIX='http://example.com'):
            member.send_invite_email()

            self.assertEquals(len(mail.outbox), 1)

            msg = mail.outbox[0]

            self.assertEquals(msg.to, ['*****@*****.**'])
Exemplo n.º 3
0
 def test_token_generation(self):
     member = PendingTeamMember(id=1, team_id=1, email='*****@*****.**')
     with self.Settings(SENTRY_KEY='a'):
         self.assertEquals(member.token, 'f3f2aa3e57f4b936dfd4f42c38db003e')