示例#1
0
文件: tests.py 项目: rflbras/lmtt
    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]")
示例#2
0
文件: tests.py 项目: rflbras/lmtt
    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]")
示例#3
0
文件: tests.py 项目: rflbras/lmtt
    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]")