예제 #1
0
 def test_duplicate_remote_request(self, *args):
     """
     Adding a second search config should not affect the initial one.
     """
     copy_app = Application.wrap(self.app.to_json())
     copy_app.modules.append(Module.wrap(copy_app.modules[0].to_json()))
     with patch('corehq.util.view_utils.get_url_base') as get_url_base_patch:
         get_url_base_patch.return_value = 'https://www.example.com'
         suite = copy_app.create_suite()
     self.assertXmlPartialEqual(self.get_xml('remote_request'), suite, "./remote-request[1]")
 def test_duplicate_remote_request(self):
     """
     Adding a second search config should not affect the initial one.
     """
     # this tests a bug encountered by enishay
     copy_app = Application.wrap(self.app.to_json())
     copy_app.modules.append(Module.wrap(copy_app.modules[0].to_json()))
     with patch('corehq.util.view_utils.get_url_base') as get_url_base_patch:
         get_url_base_patch.return_value = 'https://www.example.com'
         suite = copy_app.create_suite()
     self.assertXmlPartialEqual(self.get_xml('remote_request'), suite, "./remote-request[1]")
예제 #3
0
 def test_duplicate_remote_request(self, *args):
     """
     Adding a second search config should not affect the initial one.
     """
     copy_app = Application.wrap(self.app.to_json())
     copy_app.modules.append(Module.wrap(copy_app.modules[0].to_json()))
     suite = copy_app.create_suite()
     self.assertXmlPartialEqual(
         self.get_xml('remote_request').decode('utf-8').format(module_id="m0"),
         suite,
         "./remote-request[1]"
     )
     self.assertXmlPartialEqual(
         self.get_xml('remote_request').decode('utf-8').format(module_id="m1"),
         suite,
         "./remote-request[2]"
     )