~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

Add support for IQuestion.canBeUnsubscribedBy plus tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
2070
2070
                owner=owner, title=title, description=description)
2071
2071
        return question
2072
2072
 
 
2073
    def makeQuestionSubscription(self, question=None, person=None):
 
2074
        """Create a QuestionSubscription."""
 
2075
        if question is None:
 
2076
            question = self.makeQuestion()
 
2077
        if person is None:
 
2078
            person = self.makePerson()
 
2079
        with person_logged_in(person):
 
2080
            return question.subscribe(person)
 
2081
 
2073
2082
    def makeFAQ(self, target=None, title=None):
2074
2083
        """Create and return a new, arbitrary FAQ.
2075
2084