Skip to content

Commit

Permalink
Delete now supports utf8 addons.
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Dec 15, 2010
1 parent 7576fa4 commit 3689b73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/addons/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def delete(self, msg):

authors = [u.email for u in self.authors.all()]
to = [settings.FLIGTAR] + authors
email_msg = """
email_msg = u"""
The following add-on was deleted.
ADD-ON: %s
ID: %s
Expand Down
9 changes: 9 additions & 0 deletions apps/addons/tests/test_models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
import itertools
from urlparse import urlparse

from django.conf import settings
from django.core import mail
from django.core.cache import cache

from mock import patch
Expand Down Expand Up @@ -126,6 +128,13 @@ def test_current_version_mixed_statuses(self):
# Make sure the updated version is now considered current.
eq_(a.current_version.id, v.id)

def test_delete(self):
"""Test deleting add-ons."""
a = Addon.objects.get(pk=3615)
a.name = u'é'
a.delete('bye')
eq_(len(mail.outbox), 1)

def test_incompatible_latest_apps(self):
a = Addon.objects.get(pk=3615)
eq_(a.incompatible_latest_apps(), [])
Expand Down

0 comments on commit 3689b73

Please sign in to comment.