from django.test import TestCase, Client
from django.contrib.auth.models import User

from molo.core.tests.base import MoloTestCaseMixin
from molo.core.models import (
    SiteLanguageRelation,
    Languages
)
from molo.polls.models import PollsIndexPage


class BasePollsTestCase(TestCase, MoloTestCaseMixin):

    def setUp(self):
        self.mk_main()
        self.language_setting = Languages.objects.create(
            site_id=self.main.get_site().pk)
        self.english = SiteLanguageRelation.objects.create(
            language_setting=self.language_setting,
            locale='en',
            is_active=True)
        self.french = SiteLanguageRelation.objects.create(
            language_setting=self.language_setting,
            locale='fr',
            is_active=True)
        self.user = self.login()

        # Get the polls index page
        self.polls_index = PollsIndexPage.objects.child_of(
            self.main).first()

        self.superuser_name = 'test_superuser'
        self.superuser_password = 'password'
        self.superuser = User.objects.create_superuser(
            username=self.superuser_name,
            email='admin@example.com',
            password=self.superuser_password,
            is_staff=True)
        self.client = Client()

@@ -161,16 +161,26 @@
 mport (%0A
+    Main,%0A
     Site
@@ -1281,12 +1281,661 @@
  = Client()%0A
+%0A        self.mk_main2()%0A        self.main2 = Main.objects.all().last()%0A        self.language_setting2 = Languages.objects.create(%0A            site_id=self.main2.get_site().pk)%0A        self.english2 = SiteLanguageRelation.objects.create(%0A            language_setting=self.language_setting2,%0A            locale='en',%0A            is_active=True)%0A        self.french2 = SiteLanguageRelation.objects.create(%0A            language_setting=self.language_setting2,%0A            locale='fr',%0A            is_active=True)%0A%0A        self.mk_main2(title='main3', slug='main3', path=00010003)%0A        self.client2 = Client(HTTP_HOST=self.main2.get_site().hostname)%0A

Add another site to base test setup