def setUp(self): TestCase.setUp(self) self.user1 = self._create_model( User, first_name="User 1", last_name="User 1 last name", email="*****@*****.**") self.user2 = self._create_model( User, first_name="User 2", last_name="User 2 last name", email="*****@*****.**") self.page1 = self._create_model( Page, title="title1", description='description1', content=unicode('content1'), slug="page1", ) self.page2 = self._create_model( Page, title="title2", description='description2', content=unicode('content2'), slug="page2", )
def setUp(self): TestCase.setUp(self) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.template = self._create_template( name='notice_board_template', description='fubar' ) self.page = self._create_page( slug='test', title='title', description='description', publish=True, template_id=self.template.id, ) self.page_require_login = self._create_page( slug='test_login', title='title', description='description', login_required=True, publish=True, template_id=self.template.id, ) self.unpublished_page = self._create_page( slug='test_publish', title='title', description='description', login_required=True, template_id=self.template.id, )
def setUp(self): TestCase.setUp(self) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.template = self._create_template( name='notice_board_template', description='fubar' ) self.page = self._create_page( slug='test', title='title', description='description', publish=True, template_id=self.template.id, login_required=True, ) self.widget_type = self._create_model( WidgetType, name='poll', ) self.widget = self._create_model( Widget, name='test_poll', widget_type_id=self.widget_type.id, ) self.poll = self._create_model( Poll, question="test_question", widget_id=self.widget.id, ) self.choice1 = self._create_model( Choice, description="fu", vote=0 ) self.choice2 = self._create_model( Choice, description="bar", vote=0 )
def setUp(self): TestCase.setUp(self) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.user2 = self._create_user( email='*****@*****.**', password='******', active=True)
def setUp(self): TestCase.setUp(self) self.page = self._create_page(slug="page", title="title", description="description") self.page_1 = self._create_page( slug="page1", title="title", description="description", login_required=True, parent_id=self.page.id ) self.page_2 = self._create_page( slug="page2", title="title", description="description", login_required=True, parent_id=self.page_1.id )
def setUp(self): TestCase.setUp(self) self.admin_user = self._create_admin_user( email='*****@*****.**', password='******', active=True ) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.template = self._create_template( name='test', description='description', )
def setUp(self): TestCase.setUp(self) self.admin_user = self._create_admin_user( email="*****@*****.**", password="******", active=True) self.member_role = self._create_model( Role, name='member', description='member', ) self.member_user = self._create_model( User, email="*****@*****.**", password="******", roles=[self.member_role]) self.admin_role = self._get_model( Role, name="admin", )
def setUp(self): TestCase.setUp(self) self.admin_user = self._create_admin_user( email='*****@*****.**', password='******', active=True ) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.template = self._create_template( name="blog_template", description="desc", ) self.page = self._create_page( slug='test', title='title', description='description', template_id=self.template.id )
def setUp(self): TestCase.setUp(self) self.admin_user = self._create_admin_user( email='*****@*****.**', password='******', active=True ) self.user1 = self._create_user( email='*****@*****.**', password='******', active=True) self.widget_type = self._create_model( WidgetType, name="grid", ) self.page1 = self._create_model( Page, title='fu1', description='bar1', slug='111', publish=True, ) self.page2 = self._create_model( Page, title='fu2', description='bar2', slug='222', publish=True, ) self.page3 = self._create_model( Page, title='fu3', description='bar3', slug='333', publish=True, ) self.page4 = self._create_model( Page, title='fu4', description='bar4', slug='444', )
def setUp(self): TestCase.setUp(self) self.admin_user = self._create_admin_user(email="*****@*****.**", password="******", active=True) self.user1 = self._create_user(email="*****@*****.**", password="******", active=True) self.widget_type = self._create_model(WidgetType, name="poll") self.widget = self._create_model(Widget, name="test_widget", widget_type_id=self.widget_type.id)