Exemple #1
0
 def test_get_data(self):
     linked_docs = [get_custom_doc_for_address_and_contacts()]
     links_list = [item.name for item in linked_docs]
     d = create_linked_address(links_list)
     create_linked_contact(links_list, d)
     report_data = get_data({"reference_doctype": "Test Custom Doctype"})
     for idx, link in enumerate(links_list):
         test_item = [
             link,
             "test address line 1",
             "test address line 2",
             "Milan",
             None,
             None,
             "Italy",
             0,
             "_Test First Name",
             "_Test Last Name",
             "_Test Address-Billing",
             "+91 0000000000",
             "",
             "*****@*****.**",
             1,
         ]
         self.assertListEqual(test_item, report_data[idx])
	def test_get_data(self):
		linked_docs = [get_custom_doc_for_address_and_contacts()]
		links_list = [item.name for item in linked_docs]
		d = create_linked_address(links_list)
		create_linked_contact(links_list, d)
		report_data = get_data({"reference_doctype": "Test Custom Doctype"})
		for idx, link in enumerate(links_list):
			test_item = [link, 'test address line 1', 'test address line 2', 'Milan', None, None, 'Italy', 0, '_Test First Name', '_Test Last Name', '_Test Address-Billing', '+91 0000000000', None, '*****@*****.**', 1]
			self.assertListEqual(test_item, report_data[idx])
	def test_get_data(self):
		linked_docs = [get_custom_doc_for_address_and_contacts(), get_custom_doc_for_address_and_contacts(), get_custom_doc_for_address_and_contacts()]
		links_list = [item.name for item in linked_docs]
		create_linked_contact(links_list)
		create_linked_address(links_list)
		report_data = get_data({"reference_doctype": "Test Custom Doctype"})
		for link in links_list:
			test_item = [link, 'test address line 1', 'test address line 2', 'Milan', None, None, 'Italy', 0, '_Test First Name', '_Test Last Name', '+91 0000000000', None, '*****@*****.**', 1]
			self.assertIn(test_item, report_data)