@@ -0,0 +1,1972 @@
+from collections import defaultdict%0Aimport logging%0Aimport unittest%0A%0Afrom bs4 import BeautifulSoup%0A%0Afrom cla_public.app import create_app%0Afrom cla_public.apps.checker.constants import YES, NO%0A%0A%0Alogging.getLogger('MARKDOWN').setLevel(logging.WARNING)%0A%0A%0Aclass TestReviewPage(unittest.TestCase):%0A%0A    def setUp(self):%0A        app = create_app('config/testing.py')%0A        self.client = app.test_client()%0A%0A    def assertReviewSection(self, url, html):%0A        soup = BeautifulSoup(html)%0A        sections = soup.select('.main-content h2 a%5Bhref=%22%7B0%7D%22%5D'.format(url))%0A        self.assertEqual(%0A            1, len(sections),%0A            'Section not present: %7B0%7D'.format(url))%0A%0A    def setProblem(self, problem):%0A        with self.client.session_transaction() as session:%0A            session%5B'ProblemForm'%5D = %7B%0A                'categories': problem%7D%0A%0A    def setAboutYouAnswers(self, **kwargs):%0A        answers = defaultdict(lambda: NO)%0A        answers.update(kwargs)%0A        with self.client.session_transaction() as session:%0A            session%5B'AboutYouForm'%5D = answers%0A%0A    def setBenefits(self, passported=None, *benefits):%0A        if passported is True:%0A            benefits = %5B'income_support'%5D%0A        elif passported is False:%0A            benefits = %5B'other-benefit'%5D%0A        with self.client.session_transaction() as session:%0A            session%5B'YourBenefitsForm'%5D = %7B%0A                'benefits': benefits%7D%0A%0A    def test_review_page_about_you(self):%0A        self.setProblem('debt')%0A        self.setAboutYouAnswers(on_benefits=YES)%0A        self.setBenefits(passported=False)%0A        response = self.client.get('/review')%0A        self.assertReviewSection('/about', response.data)%0A%0A    def test_review_page_bug_passported_about_you_missing(self):%0A        self.setProblem('debt')%0A        self.setAboutYouAnswers(on_benefits=YES)%0A        self.setBenefits(passported=True)%0A        response = self.client.get('/review')%0A        self.assertReviewSection('/about', response.data)%0A

Add failing test for missing About You section on review page when on passported benefits