ashb commented on a change in pull request #4036: [AIRFLOW-2744] Allow RBAC to 
accept plugins for views and links.
URL: https://github.com/apache/incubator-airflow/pull/4036#discussion_r227449187
 
 

 ##########
 File path: tests/plugins/test_plugin.py
 ##########
 @@ -67,17 +68,40 @@ def test(self):
 
 v = TestView(category="Test Plugin", name="Test View")
 
+
+# Creating a flask appbuilder BaseView
+class TestAppBuilderBaseView(AppBuilderBaseView):
+    default_view = "test"
+
+    @expose("/")
+    def test(self):
+        return self.render("test_plugin/test.html", content="Hello galaxy!")
+
+
+v_appbuilder_view = TestAppBuilderBaseView()
+v_appbuilder_package = {"name": "Test View",
+                        "category": "Test Plugin",
+                        "view": v_appbuilder_view}
+
+# Creating a flask appbuilder Menu Item
+appbuilder_mitem = {"name": "Google",
+                    "category": "Search",
+                    "category_icon": "fa-th",
+                    "href": "https://www.google.com"}
+
+
 # Creating a flask blueprint to intergrate the templates and static folder
 bp = Blueprint(
     "test_plugin", __name__,
-    template_folder='templates',  # registers airflow/plugins/templates as a 
Jinja template folder
+    template_folder='templates', # registers airflow/plugins/templates as a 
Jinja template folder
 
 Review comment:
   This double space is required by flake8.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to