def test_addon(self):
     report = AbuseReport(addon_id=3615)
     assert (unicode(report) ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
     report.send()
     assert (mail.outbox[0].subject ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
Example #2
0
 def test_guid(self):
     report = AbuseReport(guid='*****@*****.**')
     report.send()
     assert (unicode(report) == u'[Addon] Abuse Report for [email protected]')
     assert (
         mail.outbox[0].subject == u'[Addon] Abuse Report for [email protected]')
     assert 'GUID not in database' in mail.outbox[0].body
 def test_addon_fr(self):
     with self.activate(locale='fr'):
         report = AbuseReport(addon_id=3615)
         assert (unicode(report) ==
                 u'[Extension] Abuse Report for Delicious Bookmarks')
         report.send()
     assert (mail.outbox[0].subject ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
Example #4
0
 def test_addon(self):
     report = AbuseReport(addon_id=3615)
     assert (six.text_type(report) ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
     report.send()
     assert (mail.outbox[0].subject ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
     assert 'addon/a3615' in mail.outbox[0].body
    def test_user(self):
        report = AbuseReport(user_id=999)
        report.send()
        assert (
            unicode(report) == u'[User] Abuse Report for regularuser التطب')
        assert (mail.outbox[0].subject ==
                u'[User] Abuse Report for regularuser التطب')

        assert mail.outbox[0].to == [settings.ABUSE_EMAIL]
Example #6
0
 def test_guid(self):
     report = AbuseReport(guid='*****@*****.**')
     report.send()
     assert (
         unicode(report) ==
         u'[Addon] Abuse Report for [email protected]')
     assert (
         mail.outbox[0].subject ==
         u'[Addon] Abuse Report for [email protected]')
     assert 'GUID not in database' in mail.outbox[0].body
Example #7
0
 def test_addon_fr(self):
     with self.activate(locale='fr'):
         report = AbuseReport(addon_id=3615)
         assert (
             unicode(report) ==
             u'[Extension] Abuse Report for Delicious Bookmarks')
         report.send()
     assert (
         mail.outbox[0].subject ==
         u'[Extension] Abuse Report for Delicious Bookmarks')
Example #8
0
 def test_addon(self):
     report = AbuseReport(addon_id=3615)
     assert (
         unicode(report) ==
         u'[Extension] Abuse Report for Delicious Bookmarks')
     report.send()
     assert (
         mail.outbox[0].subject ==
         u'[Extension] Abuse Report for Delicious Bookmarks')
     assert 'addon/a3615' in mail.outbox[0].body
Example #9
0
    def test_user(self):
        report = AbuseReport(user_id=999)
        report.send()
        assert (six.text_type(report) ==
                u'[User] Abuse Report for regularuser التطب')
        assert (mail.outbox[0].subject ==
                u'[User] Abuse Report for regularuser التطب')
        assert 'user/999' in mail.outbox[0].body

        assert mail.outbox[0].to == [settings.ABUSE_EMAIL]
Example #10
0
    def test_user(self):
        report = AbuseReport(user_id=999)
        report.send()
        assert (
            unicode(report) ==
            u'[User] Abuse Report for regularuser التطب')
        assert (
            mail.outbox[0].subject ==
            u'[User] Abuse Report for regularuser التطب')
        assert 'user/regularuser' in mail.outbox[0].body

        assert mail.outbox[0].to == [settings.ABUSE_EMAIL]