Commit Graph

226 Commits

Author SHA1 Message Date
Feanil Patel
4f9fe59731 test: Fix date tests that rely on user preference.
The function under test by the StrftimeLocalizedHtmlTest checks the
timezone in the user preferences of the user making the request.  If we
don't explicitly set a request here, it will simply use the last Request
that `crum` cached in the thread local cache.  This broke now
that we sometimes set the crum request.user to an invalid user in other
tests.

This change ensures that we have a valid request for these tests as a
part of the setup of this test class.
2021-03-25 13:18:07 -04:00
M. Zulqarnain
42eacaf8de refactor: pyupgrade in common/util + xblock_django (#26724) 2021-03-09 16:49:51 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Aarif
a1406cddf2 replaced unittest assertions pytest assertions (#26528) 2021-02-18 18:09:45 +05:00
Jawayria
b1ecfc2252 Applied pylint-amnesty to util 2021-02-02 14:59:19 +05:00
Michael Terry
1482755bbd Show discount deadline in a timezone-aware way
Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
2021-01-08 13:56:18 -05:00
Kyle McCormick
4dda73d797 [BD-14] Migrate all environments to use database-backed organizations (#25153)
* Install `organizations` app into LMS and Studio non-optionally.
* Add toggle `ORGANIZATIONS_AUTOCREATE` to Studio.
* Remove the `FEATURES["ORGANIZATIONS_APP"]` toggle.
* Use the new `organizations.api.ensure_organization` function to
  either validate or get-or-create organizations, depending
  on the value of `ORGANIZATIONS_AUTOCREATE`,
  when creating course runs and V2 content libraries.
  We'll soon use it for V1 content libraries as well.
* Remove the `util.organizations_helpers` wrapper layer
  that had to exist because `organizations` was an optional app.
* Add `.get_library_keys()` method to the Split modulestore.
* Add Studio management command for backfilling organizations tables
  (`backfill_orgs_and_org_courses`).

For full details, see
https://github.com/edx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst

TNL-7646
2020-12-02 13:58:40 -05:00
Feanil Patel
e90c6ae5a2 Remove all models related to shoppingcart.
DEPR-43 - Removal of Shoppingcart.

All models have been removed and the change has been deployed to production
so this should be safe to do.

It's strange that the ORM decided to drop certain fields before dropping the
whole models but decided to leave it all as the ORM generated it rather than
trying to manually change it.

Also turn the check back on to make sure people don't actually check in code
without the relevant migration files.
2020-12-02 11:36:07 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
DawoudSheraz
ad748d98eb drop video pipeline integration model with migration 2020-10-05 10:45:52 +05:00
DawoudSheraz
5ea6b8d175 remove veda integration model code 2020-10-02 10:16:45 +05:00
DawoudSheraz
1947f2105b drop precentage column from VemPipelineIntegration model 2020-08-07 13:09:48 +05:00
DawoudSheraz
dae599b517 skip db test 2020-08-07 10:27:50 +05:00
Alex Dusenbery
a29ef57da6 ENT-2892 | Migration to remove deprecated branding config fields. edx-enterprise 3.4.38 2020-08-04 15:55:49 -04:00
Alex Dusenbery
c69fb5b274 ENT-2892 | Bump edx-enterprise to 3.4.36. This version removes some model field references, but does not create a migration, to the test to check that migrations are in sync has been skipped here. 2020-08-04 14:24:56 -04:00
Lael Birch
3c8630bdf4 Update edx-enterprise requirement
Unskip a test that the new version fixes
2020-07-14 09:53:07 -04:00
Talia
34f8954145 update to new edx-enterprise version 2020-07-10 14:59:33 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Robert Raposa
70d09e6bf2 Add migration file for removal of logout view configuration (#23761)
Co-authored-by: Claudiu Ion <ioncld97@gmail.com>
2020-04-23 07:45:26 -04:00
hunytalk
42503dd736 Add writes to new field 2020-04-06 14:13:20 -04:00
Claudiu Ion
765a6867fd Remove deprecated LogoutViewConfiguration from student models 2020-04-01 18:47:49 +00:00
Cory Lee
c02d761045 Reenabling test now that the renames on the schedules table are completed (#23388)
* Reenabling this since the renames on the schedules table are completed

* Reverting regex change that caused migration to be generated for userprofile
2020-03-17 16:23:14 -04:00
Abdul Hannan
fa6633ba4e DO NOT MERGE - NEED FAKE - Rename start in schedule 5/5 (#22392)
* Remove start field in Schedules

Co-authored-by: hunytalk <ahannan@edx.org>
Co-authored-by: Cory Lee <cory@edx.org>
2020-03-12 15:40:19 -04:00
Troy Sankey
02d8913339 Merge pull request #22753 from edx/juliasq/rename_site_configuration_siteconfiguration_values_3
Rename values in SiteConfiguration/History (3/3)
2020-03-09 09:32:40 -04:00
Julia Eskew
4444ffbf1a Add migration to remove values from SiteConfiguration and unskip migration test. 2020-03-06 12:42:57 -05:00
usamasadiq
2cdc2e0d71 Removed unused commit_on_success decorator and its tests 2020-03-06 16:21:28 +05:00
Troy Sankey
d428f7530d Revert "Revert "Rename values in SiteConfiguration (2/3) attempt #2""
This reverts commit e6f58b6d4c.

This is our third (3rd!) attempt to deploy stage 2 of this column rename.
2020-03-04 14:53:47 -05:00
Diana Huang
8e6647234f Update migration to not modify providerapipermissions. (#23271) 2020-03-03 11:31:56 -05:00
Manjinder Singh
4399d13955 removing all of provider (#23269)
* Revert "Ran make migration on third_party_auth (#23253)"

This reverts commit 49be65cc58.

* Removing provider.util import

* Removing further provider things

* Adding hash tests
2020-03-03 10:42:18 -05:00
Manjinder Singh
fa2140cd16 Revert "Ran make migration on third_party_auth (#23253)"
This reverts commit 49be65cc58.
2020-03-03 09:17:26 -05:00
Manjinder Singh
49be65cc58 Ran make migration on third_party_auth (#23253)
* Ran make migration on third_party_auth and removing skip comment from test_migrations_are_in_sync
2020-03-02 16:32:40 -05:00
Manjinder Singh
953b0e728b Remove ThirdPartyAuthProviderApiPermission (#23195)
* Remove ThirdPartyAuthProviderApiPermission

Also removed ProviderApiPermissions and ApiPermissionsAdminForm and removal of DOP for third_party_auth

* Removing model

* Replaced long_token with default_token_generator

* Adding skip to test_migrations_are_in_sync
2020-02-27 15:42:09 -05:00
Troy Sankey
e6f58b6d4c Revert "Rename values in SiteConfiguration (2/3) attempt #2" 2020-02-27 13:24:55 -05:00
Troy Sankey
c422dec083 Revert "Revert "Rename values in SiteConfiguration (2/3)""
This reverts commit b85aa4b3fb.
2020-02-26 12:54:24 -05:00
Troy Sankey
b85aa4b3fb Revert "Rename values in SiteConfiguration (2/3)" 2020-02-26 11:23:56 -05:00
Julia Eskew
3541643dd5 Rename values in SiteConfiguration (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-02-25 13:54:02 -05:00
Diana Huang
67ecee91e4 Drop tracking log table. 2020-02-11 09:34:26 -05:00
Diana Huang
742868c2da Remove the tracking django backend and the TrackingLog tables. 2020-02-04 14:24:56 -05:00
hunytalk
73aae081c3 Remove null, blank from start field in Schedules 2020-01-22 18:10:33 +05:00
Brian Wilson
d290904213 Update edx-val from 1.2.0 to 1.2.1
This is step 3 of DE-1824.

Also update:
* six 1.13.0 => 1.14.0
* edx-django-utils 2.0.2 => 2.0.3
* skip test that checks all model changes have migrations.  (We defer
  this to step 4.)
2020-01-15 16:02:28 -05:00
Awais Qureshi
a2ab14d756 Bom-1146
Enabling migration test.
2020-01-13 20:27:53 +05:00
Awais Qureshi
390bae36e8 Bom-1146
Due to some recent schema changes this test is failing. Temporarily skipping it. Fix it in other PR.
2020-01-10 10:59:45 +05:00
Troy Sankey
1178ad8b8b Rename order in CreditRequirement (3/3)
This stage does the following:

- Includes a migration to delete the old column.
- NO code changes.
2020-01-07 19:17:56 +05:00
Troy Sankey
407c8cb076 Rename order in CreditRequirement (2/3)
This stage does the following:

- Includes a data migration to copy the values from old to new field.
- Changes business logic to switch to using new field.
- Deletes all code references of the old field.
2020-01-03 18:07:28 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
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