'Assert that the attributes of the bookmark model were set correctly.'

def assert_bookmark_model_is_valid(self, bookmark, bookmark_data):

    self.assertEqual(bookmark.user, bookmark_data['user'])
    self.assertEqual(bookmark.course_key, bookmark_data['course_key'])
    self.assertEqual(unicode(bookmark.usage_key), unicode(bookmark_data['usage_key']))
    self.assertEqual(bookmark.resource_id, u'{},{}'.format(bookmark_data['user'], bookmark_data['usage_key']))
    self.assertEqual(bookmark.display_name, bookmark_data['display_name'])
    self.assertEqual(bookmark.path, self.path)
    self.assertIsNotNone(bookmark.created)
    self.assertEqual(bookmark.xblock_cache.course_key, bookmark_data['course_key'])
    self.assertEqual(bookmark.xblock_cache.display_name, bookmark_data['display_name'])
