def create_activity_detail_page(self, title='title', slug='slug'): activity_page = ActivityPage( live=True, title=title, slug=slug, path=slug, activity_file=baker.make(Document), date="2018-07-31", summary="Students will discuss short-term and long-term goals and what\r\nmakes a goal SMART. They\u2019ll then create a short-term savings goal\r\nand make a plan to meet that goal.", # noqa: E501 big_idea="<p>Saving money is essential to a positive\u00a0financial future.</p>", # noqa: E501 objectives="<ul><li>Understand the importance of setting SMARTsavings goals<br/></li><li>Create a short-term SMART savings goal</li><li>Make an action plan to save money</li></ul>", # noqa: E501 essential_questions="<p></p><ul><li>How can I reach my savings goals?<br/></li></ul><p></p>", # noqa: E501 what_students_will_do="<ul><li>Use the \u201cCreating a savings plan\u201d worksheet to\u00a0brainstorm a financial goal<br/></li><li>Create a SMART goal and a savings plan to\u00a0achieve this goal</li></ul>", # noqa: E501 building_block=ActivityBuildingBlock.objects.filter(pk__in=[2]).all(), # noqa: E501 school_subject=ActivitySchoolSubject.objects.filter(pk__in=[1, 4]).all(), # noqa: E501 topic=ActivityTopic.objects.filter(pk__in=[6, 11]).all(), grade_level=ActivityGradeLevel.objects.filter(pk__in=[2]).all(), age_range=ActivityAgeRange.objects.filter(pk__in=[2]).all(), student_characteristics=[], activity_type=ActivityType.objects.filter(pk__in=[1, 2, 3]).all(), teaching_strategy=ActivityTeachingStrategy.objects.filter(pk__in=[6, 7]).all(), # noqa: E501 blooms_taxonomy_level=ActivityBloomsTaxonomyLevel.objects.filter(pk__in=[6]).all(), # noqa: E501 activity_duration=ActivityDuration.objects.get(pk=2), council_for_economic_education=ActivityCouncilForEconEd.objects.filter(pk__in=[4]).all(), # noqa: E501 jump_start_coalition=ActivityJumpStartCoalition.objects.filter(pk__in=[1]).all() # noqa: E501 ) return activity_page
def setUp(self): self.site = Site.objects.get(is_default_site=True) self.root_page = self.site.root_page self.activity_index_page = ActivityIndexPage( title="Search for activities", slug="activities", ) self.wagtail_document = Document.objects.first() self.root_page.add_child(instance=self.activity_index_page) self.activity_page = ActivityPage( title="Storing my savings", slug="storing-my-savings", date="2020-02-21", live=True, summary="Students discuss safe places to store their money", big_idea="<p>You need a secure place to store your money.</p>", objectives=( "<ul><li>Understand different options to store your savings" "</li><li>Compare and contrast different options " "to store savings</li></ul>"), essential_questions=( "</p><ul><li>What are some benefits and risks?</li>" "<li>What options for storing your savings works for you now?" "</li></ul><p></p>"), what_students_will_do=( "<ul><li>Use the <strong>Evaluating savings scenarios</strong>" "worksheet to review real-world savingssituations.</li>" "<li>Recommend a savings tool(s) for each scenario.</li></ul>" ), activity_file=self.wagtail_document, activity_duration_id=1, ) self.activity_index_page.add_child(instance=self.activity_page) self.activity_page.building_block = [1, 2, 3] self.activity_page.school_subject = [1] self.activity_page.topic = [1] self.activity_page.grade_level = [1] self.activity_page.age_range = [1] self.activity_page.student_characteristics = [1] self.activity_page.teaching_strategy = [1] self.activity_page.blooms_taxonomy_level = [1] self.activity_page.jump_start_coalition = [1] self.activity_page.council_for_economic_education = [1] self.activity_page.activity_file = self.wagtail_document self.activity_page.save() self.doc = ActivityPageDocument() self.text_fields = [ 'big_idea', 'essential_questions', 'objectives', 'related_text', 'text', 'title', 'what_students_will_do', 'id', ] self.date_fields = ['date'] self.keyword_fields = [ 'activity_duration', 'activity_type', 'age_range', 'blooms_taxonomy_level', 'building_block', 'council_for_economic_education', 'grade_level', 'jump_start_coalition', 'school_subject', 'student_characteristics', 'teaching_strategy', 'topic', ] self.doc = ActivityPageDocument()