def fixture_add_comment_report(comment=None, reported_user=None, reporter=None, created=None, report_content=None): if comment is None: comment = fixture_add_comment() if reported_user is None: reported_user = fixture_add_user() if reporter is None: reporter = fixture_add_user() if created is None: created = datetime.now() if report_content is None: report_content = \ 'Auto-generated test report' comment_report = Report() comment_report.obj = comment comment_report.reported_user = reported_user comment_report.reporter = reporter comment_report.created = created comment_report.report_content = report_content comment_report.obj = comment comment_report.save() Session.expunge(comment_report) return comment_report
def fixture_add_comment_report(comment=None, reported_user=None, reporter=None, created=None, report_content=None): if comment is None: comment = fixture_add_comment() if reported_user is None: reported_user = fixture_add_user() if reporter is None: reporter = fixture_add_user() if created is None: created=datetime.now() if report_content is None: report_content = \ 'Auto-generated test report' comment_report = Report() comment_report.obj = comment comment_report.reported_user = reported_user comment_report.reporter = reporter comment_report.created = created comment_report.report_content = report_content comment_report.obj = comment comment_report.save() Session.expunge(comment_report) return comment_report