Small fixes to LMS unit 1 failures in Django 1.11 tests
This commit is contained in:
@@ -89,6 +89,9 @@ class Bookmark(TimeStampedModel):
|
||||
|
||||
user = data.pop('user')
|
||||
|
||||
# Sometimes this ends up in data, but newer versions of Django will fail on having unknown keys in defaults
|
||||
data.pop('display_name', None)
|
||||
|
||||
bookmark, created = cls.objects.get_or_create(usage_key=usage_key, user=user, defaults=data)
|
||||
return bookmark, created
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ class BookmarkFactory(DjangoModelFactory):
|
||||
user = factory.SubFactory(UserFactory)
|
||||
course_key = COURSE_KEY
|
||||
usage_key = LOCATION('usage_id')
|
||||
path = list()
|
||||
xblock_cache = factory.SubFactory(
|
||||
'openedx.core.djangoapps.bookmarks.tests.factories.XBlockCacheFactory',
|
||||
course_key=factory.SelfAttribute('..course_key'),
|
||||
|
||||
Reference in New Issue
Block a user