예제 #1
0
 def sub_test(locale, *titles):
     url = urlparams(reverse("questions.questions", locale=locale))
     response = self.client.get(url, follow=True)
     doc = pq(response.content)
     eq_msg(len(doc("section[id^=question]")), len(titles), "Wrong number of results for {0}".format(locale))
     for substr in titles:
         assert substr in doc(".questions section .content h2 a").text()
예제 #2
0
 def sub_test(locale, *titles):
     url = urlparams(reverse('questions.questions', locale=locale))
     response = self.client.get(url, follow=True)
     doc = pq(response.content)
     eq_msg(len(doc('section[id^=question]')), len(titles),
            'Wrong number of results for {0}'.format(locale))
     for substr in titles:
         assert substr in doc('.questions section .content h2 a').text()
예제 #3
0
 def sub_test(locale, *titles):
     url = urlparams(
         reverse("questions.aaq_step4", args=["desktop", "fix-problems"], locale=locale), search="question"
     )
     response = self.client.get(url, follow=True)
     doc = pq(response.content)
     eq_msg(len(doc(".result.question")), len(titles), "Wrong number of results for {0}".format(locale))
     for substr in titles:
         assert substr in doc(".result.question h3 a").text()
예제 #4
0
 def sub_test(locale, *titles):
     url = urlparams(reverse('questions.aaq_step4',
                             args=['desktop', 'fix-problems'],
                             locale=locale),
                     search='question')
     response = self.client.get(url, follow=True)
     doc = pq(response.content)
     eq_msg(len(doc('.result.question')), len(titles),
            'Wrong number of results for {0}'.format(locale))
     for substr in titles:
         assert substr in doc('.result.question h3 a').text()
예제 #5
0
 def sub_test(locale, *titles):
     url = urlparams(reverse('questions.aaq_step4',
                             args=['desktop', 'fix-problems'],
                             locale=locale),
                     search='question')
     response = self.client.get(url, follow=True)
     doc = pq(response.content)
     eq_msg(len(doc('.result.question')), len(titles),
            'Wrong number of results for {0}'.format(locale))
     for substr in titles:
         assert substr in doc('.result.question h3 a').text()