Commit Graph

600 Commits

Author SHA1 Message Date
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Giovanni Cimolin da Silva
d1aeec45ad Remove flaky test related to MockS3Mixin
The MockS3Mixin prevents the correct setup of the ModuleStoreTestCase 
and made this test fail. Since the fix for this wasn't trivial, this 
test was skipped on python 3, and now is removed.
2019-12-27 09:59:25 -03:00
Feanil Patel
f359c9cd8f Merge pull request #21197 from open-craft/giovanni/upgrade-pymongo
BB-1744: Bump pymongo version and fix course export issue
2019-12-26 11:16:15 -05:00
Alan Zarembok
be8fef3513 PROD-1113: Fix retry_failed_photo_verifications to work when no database arguments exist. 2019-12-20 17:52:03 -05:00
Feanil Patel
2cae30cd92 Instantiate idv attempt with a string photo_id_key.
When we run the management command, the photo_id_key is retrieved
through the orm and so is represented as a string.  However, when we do
the initial attempt, the object is instantiated and we refer to the key
without having decoded it.  The photo_id_key is sent as a part of the
request to software secure.  And if we have a byte representation their
signature checking will fail.

This is why the management command worked even when the site didn't.
It was getting a cleaned key via the orm.
2019-12-19 16:18:02 -05:00
Feanil Patel
3808b2991c Ensure that photo verification data is correctly typed.
There were cases where we needed to encode things to codecs other than
ascii.  In these cases, python returns byte strings but we needed them
to be unicode so that they serialize correctly later when we combine
them with other unicode strings.
2019-12-18 13:54:37 -05:00
Giovanni Cimolin da Silva
5983d5dd42 Skip test on python 3 2019-12-11 13:54:34 -03:00
Giovanni Cimolin da Silva
c20f7cb7f5 Fix services tests 2019-12-10 19:23:44 -03:00
Adeel Khan
2b80fdbf66 Automate retry_failed_photo_verification mgt command
This patch would enable a user to run management
command via jenkins job. Verification ids
are injected via a configuration model.

PROD-1005
2019-12-10 16:53:12 +05:00
uzairr
34134ff229 Resubmit Photo-Verification button must appear in approval box.
Currently, Resubmit photo-verification button is not been displayed
inside the approval box on dashboard.In order to allow a learner to
resubmit before expire it must be displayed in it.
2019-11-21 15:21:14 +05:00
uzairr
386e05d3b1 Add warning to the bottom of verification status card on dashboard.
Learners are not allowed to make an attempt of the procotored exam if
they verify their identity near to proctored exam date.To make them,
aware about their expiry date, modification are done to the status card
so that user experience will be improved.

PROD-769
2019-10-25 18:09:39 +05:00
Manjinder Singh
80c7f5af01 BOM-933: Fix type mismatches in various migrations 5 (#22147)
* fix type mismatch in third_party_auth migrations

* fix type mismatch in verify_student  migrations

* fix type mismatch in video_config  migrations

* fix type mismatch in verified_track_content  migrations

* fix type mismatch in commercemigrations

* fix type mismatch in xblock_config migrations

* fix type mismatch in course_creators migrations

* fix type mismatch in contentstore migrations
2019-10-24 16:08:04 -04:00
aarif
164141def9 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

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
2019-10-16 12:14:01 +05:00
Christie Rice
1d5fcc60bb ENT-1604 Send signal when user is verified via SSO (#21946) 2019-10-15 08:18:54 -04:00
Awais Qureshi
f679768f9e BOM-925
Fixing TypeError, the JSON object must be str, not 'bytes'.
2019-10-15 12:57:49 +05:00
Nimisha Asthagiri
9bbc21ea8c Python 3: multi-lined assertIn, assertNotIn -> assertContains, assertNotContains 2019-09-30 08:51:02 -04:00
Nimisha Asthagiri
a6b219a9e9 Python-3: assertIn(..response.content) -> assertContains 2019-09-30 08:50:38 -04:00
Ayub khan
2b3538a6eb BOM-687
python3 compatibility
2019-09-26 12:46:47 +05:00
Ayub khan
5c47a3b425 BOM Project
Updated __unicode__ to __str__
2019-09-25 18:31:54 +05:00
Ayub
1fda63900c Merge pull request #21666 from edx/BOM-314
BOM-314
2019-09-20 18:35:59 +05:00
Ayub khan
7d055023bb BOM-314
python3 compatibility
2019-09-20 15:50:48 +05:00
Feanil Patel
f259a911c7 BOM-618 Decode content we get from test requests. 2019-09-19 10:32:23 -04:00
Feanil Patel
93142ebd2d Update the ssencrypt logic for python3.
We updated the underlying methods to always be passing unicode strings
aronud and only encode them to bytes when we need to hash them.
2019-09-18 16:28:11 -04:00
Feanil Patel
3427c1abf3 BOM-618 Pass unicode to json.loads 2019-09-18 16:28:11 -04:00
Ayub
4cf6696c84 Merge pull request #21568 from edx/BOM-273
BOM-273
2019-09-06 12:09:12 +05:00
Awais Qureshi
908adacdc2 BOM-243
python3 tests failures.
2019-09-05 15:41:36 +05:00
Ayub khan
e2d56d0a0a BOM-273
python3 compatibility
2019-09-05 12:20:26 +05:00
Ayub
aff9aca950 Merge pull request #21461 from edx/BOM-294
BOM-294
2019-09-05 09:44:35 +05:00
Ayub
2c1fc22af9 Merge pull request #21484 from edx/BOM-264
BOM-264
2019-09-04 12:48:13 +05:00
Ayub
0b29872808 Merge pull request #21479 from edx/BOM-289
BOM-289
2019-09-04 11:11:19 +05:00
Ayub
eb133f61ac Merge pull request #21480 from edx/BOM-335
BOM-335
2019-09-04 11:09:56 +05:00
Ayub khan
eef343d212 BOM-264
py3 unit test fix
2019-08-28 15:49:58 +05:00
aarif
ee264b38e9 python 3 fixes 2019-08-28 15:44:35 +05:00
Ayub khan
f7d528eee4 BOM-289
py3 unittest fix
2019-08-28 15:09:48 +05:00
Ayub khan
70b4004be8 BOM-335
py3 unittest fix
2019-08-28 15:07:29 +05:00
Ayub khan
f80cbf3ed4 BOM-294
fixed failing test;
2019-08-27 16:45:46 +05:00
Awais Qureshi
3f3caba0da Merge pull request #21360 from edx/awais786/BOM-88
BOM-88
2019-08-20 20:51:32 +05:00
arbisoft
44c798feb2 Fixing encode/decode issues for python3. 2019-08-20 14:10:37 +05:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
Dave St.Germain
5febcce20c Fix python3 compatibility in SafeCookieData and elsewhere 2019-08-19 10:24:15 -04:00
Feanil Patel
1bb50088dc More test collection fixes. 2019-08-08 11:23:14 -04:00
Ayub khan
2244540ade BOM-78
Update uuid4().hex.decode(ascii) calls
2019-08-06 17:16:08 +05:00
Feanil Patel
dead415d2b :-( Moto and HTTPretty don't play well together.
Moto has a vendored version of HTTPretty which also monkey patches the
socket object.  If you activate both, you get weird errors like
https://github.com/spulec/moto/issues/750

So we're opting not to activate both in this test.  We're are just using
the moto vendored version of httpretty for both our usage and the
mocking of boto.

I also removed the logic that seemed like it was just testing that our
mock is a mocking s3 correctly.
2019-08-02 13:42:10 -04:00
Feanil Patel
624455c89a Use deprecated s3 mock from moto.
Longer term we should move to boto3 in general and then we can use the
default moto mock for s3.
2019-08-02 13:42:02 -04:00
Aarif
cb530bf788 Merge pull request #21113 from edx/INCR-444
INCR-444 Python 3 compatibility
2019-07-25 12:43:33 +05:00
Farhanah Sheets
fed5322725 Filter NULL expiry_date from SoftwareSecure filter query 2019-07-24 16:44:38 -04:00
aarif
8f6569f462 ran python-modernize and isort on files mentioned in INCR-444
changes made to comply with quality
2019-07-24 19:07:55 +05:00