コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 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)
コード例 #4
0
 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,
     )
コード例 #5
0
 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,
     )
コード例 #6
0
 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,
     )
コード例 #7
0
 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,
     )
コード例 #8
0
 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,
     )
コード例 #9
0
 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)
コード例 #10
0
 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)
コード例 #11
0
 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)
コード例 #12
0
 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)
コード例 #13
0
 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)
コード例 #14
0
 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)
コード例 #15
0
 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)
コード例 #16
0
 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)
コード例 #17
0
 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)