Beispiel #1
0
    def test_get_template_with_prefixes(self, find):
        find.return_value = "found"
        result = Subrecord._get_template("a_{}_b", prefixes=["onions"])

        find.assert_called_once_with(
            [os.path.join("a_onions", "subrecord_b"), "a_subrecord_b"])
        self.assertEqual(result, "found")
Beispiel #2
0
    def test_get_template_with_prefixes(self, find):
        find.return_value = "found"
        result = Subrecord._get_template("a_{}_b", prefixes=["onions"])

        find.assert_called_once_with([
            os.path.join("a_onions", "subrecord_b"),
            "a_subrecord_b"
        ])
        self.assertEqual(result, "found")
Beispiel #3
0
 def test_get_template(self, find):
     find.return_value = "found"
     result = Subrecord._get_template("a_{}_b")
     find.assert_called_once_with(["a_subrecord_b"])
     self.assertEqual(result, "found")
Beispiel #4
0
 def test_get_template(self, find):
     find.return_value = "found"
     result = Subrecord._get_template("a_{}_b")
     find.assert_called_once_with(["a_subrecord_b"])
     self.assertEqual(result, "found")