Commit 748adc80 authored by Porkepix's avatar Porkepix

Clean test file from every unicode tests as those are now useless with Python 3

parent 1d2b6677
from django.conf import settings
from django.test import TestCase
from picampaign.campaign.models import Campaign, Argumentary, CampaignContact
from picampaign.campaign.models import Campaign, CampaignContact
from picampaign.contact.models import Contact
class CampaignMethodTests(TestCase):
def test_unicode_is_title(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
self.assertEqual(campaign.__unicode__(), 'Campaign Title')
def test_unicode_is_unicode(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
self.assertEqual(
str(type(campaign.__unicode__())),
"<type 'unicode'>"
)
class ArgumentaryMethodTests(TestCase):
def test_unicode_is_title(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
argumentary = Argumentary(
campaign=campaign,
lang='en'
)
self.assertEqual(
argumentary.__unicode__(),
"Argumentary in en for Campaign Title"
)
def test_unicode_is_unicode(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
argumentary = Argumentary(
campaign=campaign,
lang='en'
)
self.assertEqual(
str(type(argumentary.__unicode__())),
"<type 'unicode'>"
)
class CampaignContactMethodTests(TestCase):
def test_unicode_is_contact_and_title(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
contact = Contact(
first_name='Victor',
last_name='Hugo',
phone='+3312345678'
)
campaigncontact = CampaignContact(
campaign=campaign,
contact=contact
)
self.assertEqual(
campaigncontact.__unicode__(),
"Contact Victor Hugo on Campaign Title"
)
def test_unicode_is_unicode(self):
campaign = Campaign(
title='Campaign Title',
start_date='2000-01-01',
end_date='2100-12-31'
)
contact = Contact(
first_name='Victor',
last_name='Hugo',
phone='+3312345678'
)
campaigncontact = CampaignContact(
campaign=campaign,
contact=contact
)
self.assertEqual(
str(campaigncontact),
"Contact Contact object on Campaign Title"
)
def test_all_groups_is_empty(self):
campaign = Campaign(
title='Campaign Title',
......
Markdown is supported
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