<s> import copy <EOL> from django . conf import settings <EOL> from django . test . utils import override_settings <EOL> import horizon <EOL> from openstack_dashboard . test import helpers as test <EOL> from openstack_dashboard . test . test_panels . plugin_panel import panel as plugin_panel <EOL> import openstack_dashboard . test . test_plugins . panel_group_config <EOL> from openstack_dashboard . utils import settings as util_settings <EOL> PANEL_GROUP_SLUG = '<STR_LIT>' <EOL> HORIZON_CONFIG = copy . deepcopy ( settings . HORIZON_CONFIG ) <EOL> INSTALLED_APPS = list ( settings . INSTALLED_APPS ) <EOL> HORIZON_CONFIG . pop ( '<STR_LIT>' , None ) <EOL> HORIZON_CONFIG . pop ( '<STR_LIT>' , None ) <EOL> util_settings . update_dashboards ( [ <EOL> openstack_dashboard . test . test_plugins . panel_group_config , <EOL> ] , HORIZON_CONFIG , INSTALLED_APPS ) <EOL> @ override_settings ( HORIZON_CONFIG = HORIZON_CONFIG , <EOL> INSTALLED_APPS = INSTALLED_APPS ) <EOL> class PanelGroupPluginTests ( test . PluginTestCase ) : <EOL> def test_add_panel_group ( self ) : <EOL> dashboard = horizon . get_dashboard ( "<STR_LIT>" ) <EOL> self . assertIsNotNone ( dashboard . get_panel_group ( PANEL_GROUP_SLUG ) ) <EOL> def test_add_panel ( self ) : <EOL> dashboard = horizon . get_dashboard ( "<STR_LIT>" ) <EOL> self . assertIn ( plugin_panel . PluginPanel , <EOL> [ p . __class__ for p in dashboard . get_panels ( ) ] ) <EOL> def test_unregistered_panel_group ( self ) : <EOL> dashboard = horizon . get_dashboard ( "<STR_LIT>" ) <EOL> self . assertIsNone ( dashboard . get_panel_group ( "<STR_LIT>" ) ) </s>
