changes made to fix jenkins/quality errors
changes made as suggested
added the docstring to fix quality issue
made a few changes to fix some tests
replaced json.loads with a util to handle bytes
changes made to fix jenkins/quality errors
changes made as suggested
added the docstring to fix quality issue
made a few changes to fix some tests
made changes as suggested
made changes as suggested
updated the requirements with make upgrade
changes made to pass tests with python 2 and other minor changes
Updated the tests to fix the string/bytes input
changes made to pass tests with python 2 and other minor changes
made some changes as suggested
made changes as suggested
changes made as suggested
BOM-898 fix test_responsetypes.py issues
Updated safe_exec to use random2 library instead of random.
As python3 random generates different results as compared to
python2, which causes a lot of test failures and if we use
python3 random and fix tests it will cause state invalidation
of capa problems, So random2 was uses to make the behaviour same
in python3.
BOM-899 name xrange is not defined
xrange is used in safe_exec and there might be old courses where
this is being used in capa problems. All those tests fail in python3
as this was renamed to range. Used six.moves.xrange so that code
works for python3 and if there is any old code using xrange it
works too.
The _id comes back as a dict and it's in the wrong order compared to the
dict stored in mongo. This results in lookups for deletion failing when
we use the '_id' as the lookup key.
Luckily the delete function also takes the asset_key as a valid key to
delete by so we just use that instead.
Treat transcript content as unicode strings and convert them at any edge
where we encounter them. One decision made here was to not update
edx-val it treats transcripts as byte but is much closer to the actual
files so it makes more sense over there. But within the platform they
are generally passed around as serialized json and so it's much better
for them to be unicode.
Python3 RNG produces different results as compared to python2
In capa problems we save seed value and generate random state
using the seed. Python3 random generates a different state as
compared to python2. Thats why using random2 library to make
state genration consistent in both python versions.