'get_items(locator, qualifiers, [branch])'

def test_get_items(self):

    locator = CourseLocator(org='testx', course='GreekHero', run='run', branch=BRANCH_NAME_DRAFT)
    matches = modulestore().get_items(locator)
    self.assertEqual(len(matches), 8)
    matches = modulestore().get_items(locator)
    self.assertEqual(len(matches), 8)
    matches = modulestore().get_items(locator, qualifiers={'category': 'chapter'})
    self.assertEqual(len(matches), 4)
    matches = modulestore().get_items(locator, qualifiers={'category': 'garbage'})
    self.assertEqual(len(matches), 0)
    matches = modulestore().get_items(locator, qualifiers={'name': 'chapter1'})
    self.assertEqual(len(matches), 1)
    matches = modulestore().get_items(locator, qualifiers={'name': ['chapter1', 'chapter2']})
    self.assertEqual(len(matches), 2)
    matches = modulestore().get_items(locator, qualifiers={'category': 'chapter'}, settings={'display_name': re.compile('Hera')})
    self.assertEqual(len(matches), 2)
    matches = modulestore().get_items(locator, settings={'group_access': {'$exists': True}})
    self.assertEqual(len(matches), 1)
    matches = modulestore().get_items(locator, settings={'group_access': {'$exists': False}})
    self.assertEqual(len(matches), 7)
