Beispiel #1
0
    def test_update_address_template(self):
        """Update an existing Address Template."""
        country = ensure_country("Germany")
        if not frappe.db.exists("Address Template", country.name):
            template = frappe.get_doc({
                "doctype": "Address Template",
                "country": country.name,
                "template": "EXISTING"
            }).insert()

        update_address_template(country.name, "NEW")
        doc = frappe.get_doc("Address Template", country.name)
        self.assertEqual(doc.template, "NEW")
Beispiel #2
0
 def test_create_address_template(self):
     """Create a new Address Template."""
     country = ensure_country("Germany")
     update_address_template(country.name, "TEST")
     doc = frappe.get_doc("Address Template", country.name)
     self.assertEqual(doc.template, "TEST")