def test_extract_multiple_options_with_globals(self): '''It extracts multiple options from an included item''' inc = 'contrib.openstack.templates|inc=*.template,inc=foo.*' result = sync.extract_options(inc, global_options=['inc=*.cfg']) ex = ('contrib.openstack.templates', ['inc=*.template', 'inc=foo.*', 'inc=*.cfg']) self.assertEquals(ex, result)
def test_extract_option_with_global_as_string(self): '''It extracts option for include with global options as str''' inc = 'contrib.openstack.templates|inc=*.template' result = sync.extract_options(inc, global_options='inc=foo.*') ex = ('contrib.openstack.templates', ['inc=*.template', 'inc=foo.*']) self.assertEquals(ex, result)
def test_extract_option_with_globals(self): '''It extracts option from an included item with global options''' inc = 'contrib.openstack.templates|inc=*.template' result = sync.extract_options(inc, global_options=['inc=*.cfg']) ex = ('contrib.openstack.templates', ['inc=*.template', 'inc=*.cfg']) self.assertEquals(ex, result)