New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String formatting error failing in legacy download of assessment items #5214

Merged
merged 2 commits into from Jul 27, 2016

Conversation

Projects
None yet
1 participant
@benjaoming
Member

benjaoming commented Jul 27, 2016

Summary

This error has caused downloading of assessment items to fail, but no one has noticed, so likely no one uses this functionality. It's gonna be deleted in 0.17.

Issues addressed

#5209

@benjaoming benjaoming added the bug label Jul 27, 2016

@benjaoming benjaoming added this to the 0.16.7 milestone Jul 27, 2016

@benjaoming benjaoming self-assigned this Jul 27, 2016

@benjaoming benjaoming added the has PR label Jul 27, 2016

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jul 27, 2016

Member

I'm satisfied with the fact that the previous error has gone -- so merging this.

I can manually run the tests without any error. I will verify manually that unpacking assessment items works and open up a new issue regarding the new test failure.

Member

benjaoming commented Jul 27, 2016

I'm satisfied with the fact that the previous error has gone -- so merging this.

I can manually run the tests without any error. I will verify manually that unpacking assessment items works and open up a new issue regarding the new test failure.

from django.conf import settings as django_settings
from django.core.management.base import BaseCommand, CommandError
from fle_utils.general import ensure_dir

This comment has been minimized.

@benjaoming

benjaoming Jul 27, 2016

Member

All of the above is just a bunch of automated import sorting.

@benjaoming

benjaoming Jul 27, 2016

Member

All of the above is just a bunch of automated import sorting.

This comment has been minimized.

@benjaoming

benjaoming Jul 27, 2016

Member

...in a file that's legacy and destined for removal soon.

@benjaoming

benjaoming Jul 27, 2016

Member

...in a file that's legacy and destined for removal soon.

"Downloaded size: {}".format(
str(int(content_length) // 1024 // 1024) + " MB" if content_length else "Unknown"
)
)

This comment has been minimized.

@benjaoming

benjaoming Jul 27, 2016

Member

This is the actual fix.

@benjaoming

benjaoming Jul 27, 2016

Member

This is the actual fix.

@@ -37,7 +38,9 @@
class UnpackAssessmentZipCommandTests(KALiteTestCase):
def setUp(self):
reset_content_db()

This comment has been minimized.

@benjaoming

benjaoming Jul 27, 2016

Member

This is the secondary fix that assured tests were running locally on my box.

@benjaoming

benjaoming Jul 27, 2016

Member

This is the secondary fix that assured tests were running locally on my box.

print("Copying {} to {}".format(template_path, dest_database))
shutil.copy(template_path, dest_database)
else:
print("Skipping {}".format(template_path))

This comment has been minimized.

@benjaoming

benjaoming Jul 27, 2016

Member

Factored out of setup.py for DRY.

@benjaoming

benjaoming Jul 27, 2016

Member

Factored out of setup.py for DRY.

@benjaoming benjaoming merged commit 03a2e38 into learningequality:0.16.x Jul 27, 2016

1 check failed

ci/circleci Your tests failed on CircleCI
Details

@benjaoming benjaoming removed the has PR label Jul 27, 2016

@benjaoming benjaoming deleted the benjaoming:stringformaterr branch Jul 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment