'This verifies a bug we had where the None setting in get_items() meant \'wildcard\'
Unfortunately, None = published for the revision field, so get_items() would return
both draft and non-draft copies.'

def test_get_items(self):

    self.store.convert_to_draft(self.problem.location, self.user.id)
    direct_store_items = self.store.get_items(self.course.id, revision=ModuleStoreEnum.RevisionOption.published_only)
    items_from_direct_store = [item for item in direct_store_items if (item.location == self.problem.location)]
    self.assertEqual(len(items_from_direct_store), 1)
    self.assertFalse(getattr(items_from_direct_store[0], 'is_draft', False))
    draft_store_items = self.store.get_items(self.course.id, revision=ModuleStoreEnum.RevisionOption.draft_only)
    items_from_draft_store = [item for item in draft_store_items if (item.location == self.problem.location)]
    self.assertEqual(len(items_from_draft_store), 1)
    self.assertTrue(getattr(items_from_draft_store[0], 'is_draft', False))
