Commit 1d2b6677 authored by okhin's avatar okhin
Browse files

WIP #4 test on campaigncontact is fixed

parent 0acb00ba
...@@ -46,7 +46,7 @@ class CampaignContact(models.Model): ...@@ -46,7 +46,7 @@ class CampaignContact(models.Model):
contact = models.ForeignKey(Contact) contact = models.ForeignKey(Contact)
weight = models.IntegerField(default=0) weight = models.IntegerField(default=0)
def __unicode__(self): def __str__(self):
args = {'contact': self.contact, 'title': self.campaign.title} args = {'contact': self.contact, 'title': self.campaign.title}
return _('Contact %(contact)s on %(title)s') % args return _('Contact %(contact)s on %(title)s') % args
......
...@@ -92,8 +92,8 @@ class CampaignContactMethodTests(TestCase): ...@@ -92,8 +92,8 @@ class CampaignContactMethodTests(TestCase):
contact=contact contact=contact
) )
self.assertEqual( self.assertEqual(
str(type(campaigncontact.__unicode__())), str(campaigncontact),
"<type 'unicode'>" "Contact Contact object on Campaign Title"
) )
def test_all_groups_is_empty(self): def test_all_groups_is_empty(self):
......
...@@ -12,9 +12,11 @@ requires = [ ...@@ -12,9 +12,11 @@ requires = [
'pillow', 'pillow',
] ]
test_requires = requires + ['pytest']
setup(name='picampaign', setup(name='picampaign',
namespace_packages=['picampaign'], namespace_packages=['picampaign'],
version='0.0.1', version='0.0.2',
description='PiPhone Campaign Manager.', description='PiPhone Campaign Manager.',
long_description=README, long_description=README,
classifiers=["Programming Language :: Python"], classifiers=["Programming Language :: Python"],
...@@ -26,5 +28,5 @@ setup(name='picampaign', ...@@ -26,5 +28,5 @@ setup(name='picampaign',
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
install_requires=requires, install_requires=requires,
tests_require=requires, tests_require=test_requires,
) )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment