Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Wassibauer committed Nov 8, 2011
1 parent a58a4ac commit 277857b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion threaded_messages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from django.utils.translation import ugettext_lazy as _
from django.db.models import F, Q
from django.db.models import Avg, Max, Min, Count
from listeners import start_listening

from listeners import start_listening
start_listening()

class MessageManager(models.Manager):
Expand Down
14 changes: 2 additions & 12 deletions threaded_messages/tests.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import datetime
from django.test import TestCase
from django.contrib.auth.models import User
from threaded_messages.models import Message
from models import Message
from utils import strip_quotes

class DeleteTestCase(TestCase):
def setUp(self):
self.user1 = User.objects.create_user('user3', 'user3@example.com', '123456')
self.user2 = User.objects.create_user('user4', 'user4@example.com', '123456')
self.msg1 = Message(sender=self.user1, thread=thread, body='Body Text 1')
self.msg2 = Message(sender=self.user1, thread=thread, body='Body Text 2')
self.msg1.sender_deleted_at = datetime.datetime.now()
self.msg2.recipient_deleted_at = datetime.datetime.now()
self.msg1.save()
self.msg2.save()

class UtilsTest(TestCase):
def test_strip_quotes(self):
Expand All @@ -31,7 +21,7 @@ def test_strip_quotes(self):
>>
>"""

body_stripepd = """nyan nyan nyan nyan nyan
body_stripped = """nyan nyan nyan nyan nyan
nyan nyan nyan nyan nyan
nyan nyan nyan nyan nyan
Expand Down
2 changes: 1 addition & 1 deletion threaded_messages/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# favour django-mailer but fall back to django.core.mail
if tm_settings.THREADED_MESSAGES_USE_SENDGRID:
import sendgrid_parse_api
import sendgrid_parse_api

if "mailer" in settings.INSTALLED_APPS:
from mailer import send_mail
Expand Down

0 comments on commit 277857b

Please sign in to comment.