def test_decline_and_improvement(self): stats = _makeContext(declines=[None], improvements=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn("We've found one prescribing measure where this " "thing is <span class='worse'>getting worse</span>, " "and one measure where it is <span class='better'>" "improving", msg)
def test_worst(self): stats = _makeContext(worst=[None]) msg = bookmark_utils.getIntroText(stats, 'CCG') self.assertNotIn("We've no new information about this CCG", msg) self.assertIn( "We've found one prescribing measure where this " "CCG could be <span class='worse'>doing better", msg)
def test_decline_and_worse(self): stats = _makeContext(declines=[None], worst=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn( "We've found two prescribing measures where this " "thing is <span class='worse'>getting worse, " "or could be doing better", msg)
def test_improvement_and_best(self): stats = _makeContext(improvements=[None], best=[None]) msg = bookmark_utils.getIntroText(stats, "thing") self.assertIn( "We've found two prescribing measures where this " "thing is <span class='better'>doing well", msg, )
def test_improvement(self): stats = _makeContext(improvements=[None]) msg = bookmark_utils.getIntroText(stats, "thing") self.assertIn( "We've found one prescribing measure where this " "thing is <span class='better'>improving", msg, )
def test_decline_plural(self): stats = _makeContext(declines=[None, None]) msg = bookmark_utils.getIntroText(stats, "CCG") self.assertIn( "We've found two prescribing measures where this " "CCG is <span class='worse'>getting worse", msg, )
def test_worst_plural(self): stats = _makeContext(worst=[None, None]) msg = bookmark_utils.getIntroText(stats, "CCG") self.assertIn( "We've found two prescribing measures where this " "CCG could be <span class='worse'>doing better", msg, )
def test_possible_savings(self): stats = _makeContext(possible_savings=[None]) msg = bookmark_utils.getIntroText(stats, "thing") self.assertIn( "We've also found one prescribing measure where there " "are some potential cost savings", msg, )
def test_nothing(self): stats = _makeContext(possible_top_savings_total=9000.1) msg = bookmark_utils.getIntroText(stats, 'CCG') self.assertIn("We've no new information about this CCG", msg)
def test_worst(self): stats = _makeContext(worst=[None]) msg = bookmark_utils.getIntroText(stats, 'CCG') self.assertNotIn("We've no new information about this CCG", msg) self.assertIn("We've found one prescribing measure where this " "CCG could be <span class='worse'>doing better", msg)
def test_improvement_and_best(self): stats = _makeContext(improvements=[None], best=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn("We've found two prescribing measures where this " "thing is <span class='better'>doing well", msg)
def test_improvement(self): stats = _makeContext(improvements=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn("We've found one prescribing measure where this " "thing is <span class='better'>improving", msg)
def test_decline_and_worse(self): stats = _makeContext(declines=[None], worst=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn("We've found two prescribing measures where this " "thing is <span class='worse'>getting worse, " "or could be doing better", msg)
def test_decline_plural(self): stats = _makeContext(declines=[None, None]) msg = bookmark_utils.getIntroText(stats, 'CCG') self.assertIn("We've found two prescribing measures where this " "CCG is <span class='worse'>getting worse", msg)
def test_worst_plural(self): stats = _makeContext(worst=[None, None]) msg = bookmark_utils.getIntroText(stats, 'CCG') self.assertIn("We've found two prescribing measures where this " "CCG could be <span class='worse'>doing better", msg)
def test_possible_savings(self): stats = _makeContext(possible_savings=[None]) msg = bookmark_utils.getIntroText(stats, 'thing') self.assertIn("We've also found one prescribing measure where there " "are some potential cost savings", msg)