def test_build_term_with_extra_spaced_params(self): """ build_term() should return a string with only one space between each word. """ self.assertEqual(build_term(" term", 2012), "term and 2012[pdat]") self.assertEqual(build_term("term ", 2012), "term and 2012[pdat]") self.assertEqual(build_term(" term1 term2 ", 2012), "term1 term2 and 2012[pdat]")
def test_build_term_with_valid_params(self): """ build_term() should return a string with the form "%s and %d[pdat]". """ self.assertEqual(build_term("term", 2012), "term and 2012[pdat]")
def test_build_term_with_upper_case_params(self): """ build_term() should return a small cased string. """ self.assertEqual(build_term("TERM", 2012), "term and 2012[pdat]")