def test_related_view_add_with_excluded_search(self):
        """
        Test related add view with excluded search field
        """
        with self.app.test_client() as client:
            self.browser_login(client, USERNAME_ADMIN, PASSWORD_ADMIN)

            # Test excluded search field will not impact related view
            rv = client.get("/model2view/add?_flt_0_group=1")
            data = rv.data.decode("utf-8")
            self.assertNotIn('<label for="group"', data)

            # Test direct edit view include related field
            rv = client.get("/model2view/add")
            data = rv.data.decode("utf-8")
            self.assertIn('<label for="group"', data)

        Test related add view with excluded search field
        
tests/test_mvc.py