def current_history_is(step, history_text): if len(NSIInfo.objects.all()) == 0: NSIInfo(history=history_text, summary='spam').save() else: info = NSIInfo.objects.all()[0] info.history = history_text info.save()
def current_summary_is(step, summary_text): if len(NSIInfo.objects.all()) == 0: NSIInfo(history='eggs', summary=summary_text).save() else: info = NSIInfo.objects.all()[0] info.summary = summary_text info.save()
def test_convert_its_RST_text_to_HTML(self): h = NSIInfo(about="*NSI* site rulz!") h.about_as_html() |should| contain('<em>NSI</em> site rulz!')
def test_convert_its_RST_text_to_HTML(self): h = NSIInfo(history="*NSI* site rulz!", summary="Site *NSI* sinistro!") h.history_as_html() |should| contain('<em>NSI</em> site rulz!') h.summary_as_html() |should| contain('Site <em>NSI</em> sinistro!')
def test_convert_its_RST_text_to_HTML(self): h = NSIInfo(history="*NSI* site rulz!", summary="Site *NSI* sinistro!") h.history_as_html() | should | contain('<em>NSI</em> site rulz!') h.summary_as_html() | should | contain('Site <em>NSI</em> sinistro!')