'Test get_check_names'

@mock.patch('config.get_auto_confd_path', return_value=os.path.join(os.path.dirname(__file__), 'fixtures/auto_conf/'))
def test_get_check_names(self, mock_get_auto_confd_path):

    kv_tpls = {'foo': [['check0', 'check1'], [{}, {}], [{}, {}]], 'bar': [['check2', 'check3'], [{}, {}], [{}, {}]]}
    auto_tpls = {'foo': [['check4', 'check5'], [{}, {}], [{}, {}]], 'bar': [['check2', 'check6'], [{}, {}], [{}, {}]], 'foobar': None}
    cache = _TemplateCache(issue_read, '')
    cache.kv_templates = kv_tpls
    cache.auto_conf_templates = auto_tpls
    self.assertEquals(cache.get_check_names('foo'), set(['check0', 'check1', 'check4', 'check5']))
    self.assertEquals(cache.get_check_names('bar'), set(['check2', 'check3', 'check6']))
    self.assertEquals(cache.get_check_names('foobar'), set())
    self.assertEquals(cache.get_check_names('baz'), set())
