<s> import yaml <EOL> from st2tests . base import BaseActionTestCase <EOL> from expand_repo_name import ExpandRepoName <EOL> __all__ = [ <EOL> '<STR_LIT>' <EOL> ] <EOL> MOCK_CONFIG_BLANK = "<STR_LIT>" <EOL> MOCK_CONFIG_BLANK_REPOSITORIES = "<STR_LIT>" <EOL> MOCK_CONFIG_FULL = """<STR_LIT>""" <EOL> class ExpandRepoNameTestCase ( BaseActionTestCase ) : <EOL> action_cls = ExpandRepoName <EOL> def test_run_config_blank ( self ) : <EOL> config = yaml . safe_load ( MOCK_CONFIG_BLANK ) <EOL> action = self . get_action_instance ( config = config ) <EOL> self . assertRaises ( Exception , action . run , <EOL> repo_name = "<STR_LIT>" ) <EOL> def test_run_repositories_blank ( self ) : <EOL> config = yaml . safe_load ( MOCK_CONFIG_BLANK_REPOSITORIES ) <EOL> action = self . get_action_instance ( config = config ) <EOL> self . assertRaises ( Exception , action . run , <EOL> repo_name = "<STR_LIT>" ) <EOL> def test_run_st2contrib_expands ( self ) : <EOL> config = yaml . safe_load ( MOCK_CONFIG_FULL ) <EOL> action = self . get_action_instance ( config = config ) <EOL> expected = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : True } <EOL> result = action . run ( repo_name = "<STR_LIT>" ) <EOL> self . assertEqual ( result , expected ) <EOL> def test_run_st2incubator_expands ( self ) : <EOL> config = yaml . safe_load ( MOCK_CONFIG_FULL ) <EOL> action = self . get_action_instance ( config = config ) <EOL> expected = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : True } <EOL> result = action . run ( repo_name = "<STR_LIT>" ) <EOL> self . assertEqual ( result , expected ) </s>
