Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions importer/tests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ def get_counts():
).distinct()
self.assertEqual(htmls.count(), 1)
self.assertEqual(
[asset.asset for asset in htmls[0].static_assets.all()],
[
sorted([
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The important part of this change is the addition of .name to the asset.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was it doing before? Coercing FileField to a string before comparison?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I assume it was, and maybe still does on some machines. It just broke for me on a fresh installation. In any case, this is more explicit.

asset.asset.name for asset in htmls[0].static_assets.all()]),
sorted([
"assets/edX/toy/TT_2012_Fall/essays_x250.png",
"assets/edX/toy/TT_2012_Fall/webGLDemo.css",
]
])
)