示例#1
0
    def test_substitution_notfound(self):
        attributes = ["$NotToBeFound", "ZZ", "$FamilyName"]
        expected_str = "ZZARAGO MONZONIS"
        p = Processing()
        final_str = p.substitute(attributes, self.datasets[0])

        self.assertEqual(final_str, expected_str)
示例#2
0
    def test_substitution(self):
        attributes = ["$GivenName", " ", "$FamilyName"]
        expected_str = "FRANCISCO JOSE ARAGO MONZONIS"
        p = Processing()
        final_str = p.substitute(attributes, self.datasets[0])

        self.assertEqual(final_str, expected_str)
示例#3
0
    def test_substitution_no_attrs(self):
        attributes = []
        p = Processing()
        final_str = p.substitute(attributes, self.datasets[0])

        self.assertEqual(final_str, "")