'Tests preview_handler should not update blocks being previewed'

@ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo)
def test_block_branch_not_changed_by_preview_handler(self, default_store):

    client = Client()
    client.login(username=self.user.username, password=self.user_password)
    with self.store.default_store(default_store):
        course = CourseFactory.create()
        block = ItemFactory.create(parent_location=course.location, category='problem')
        url = reverse_usage_url('preview_handler', block.location, kwargs={'handler': 'xmodule_handler/problem_check'})
        response = client.post(url)
        self.assertEqual(response.status_code, 200)
        self.assertFalse(modulestore().has_changes(modulestore().get_item(block.location)))
