Example #1
0
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()
Example #2
0
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()
Example #3
0
 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!')
Example #4
0
 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!')
Example #5
0
 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!')