Replace usage of UUID.get_hex() - BOM-672
This commit is contained in:
committed by
Feanil Patel
parent
1b6e6634cb
commit
23870802c6
@@ -346,7 +346,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
Then the cohort has 1 user
|
||||
And appropriate events have been emitted
|
||||
"""
|
||||
cohort_name = str(uuid.uuid4().get_hex()[0:20])
|
||||
cohort_name = str(uuid.uuid4().hex[0:20])
|
||||
self._verify_cohort_settings(cohort_name=cohort_name, assignment_type=None)
|
||||
|
||||
def test_add_new_cohort_with_manual_assignment_type(self):
|
||||
@@ -361,7 +361,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
Then the cohort has 1 user
|
||||
And appropriate events have been emitted
|
||||
"""
|
||||
cohort_name = str(uuid.uuid4().get_hex()[0:20])
|
||||
cohort_name = str(uuid.uuid4().hex[0:20])
|
||||
self._verify_cohort_settings(cohort_name=cohort_name, assignment_type='manual')
|
||||
|
||||
def test_add_new_cohort_with_random_assignment_type(self):
|
||||
@@ -376,7 +376,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
Then the cohort has 1 user
|
||||
And appropriate events have been emitted
|
||||
"""
|
||||
cohort_name = str(uuid.uuid4().get_hex()[0:20])
|
||||
cohort_name = str(uuid.uuid4().hex[0:20])
|
||||
self._verify_cohort_settings(cohort_name=cohort_name, assignment_type='random')
|
||||
|
||||
def test_update_existing_cohort_settings(self):
|
||||
@@ -396,7 +396,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
And cohort with new name is present in cohorts dropdown list
|
||||
And cohort assignment type should be "manual"
|
||||
"""
|
||||
cohort_name = str(uuid.uuid4().get_hex()[0:20])
|
||||
cohort_name = str(uuid.uuid4().hex[0:20])
|
||||
new_cohort_name = '{old}__NEW'.format(old=cohort_name)
|
||||
self._verify_cohort_settings(
|
||||
cohort_name=cohort_name,
|
||||
@@ -422,7 +422,7 @@ class CohortConfigurationTest(EventsTestMixin, UniqueCourseTest, CohortTestMixin
|
||||
And I click on Save button
|
||||
Then I should see an error message
|
||||
"""
|
||||
cohort_name = str(uuid.uuid4().get_hex()[0:20])
|
||||
cohort_name = str(uuid.uuid4().hex[0:20])
|
||||
new_cohort_name = ''
|
||||
self._verify_cohort_settings(
|
||||
cohort_name=cohort_name,
|
||||
|
||||
@@ -41,7 +41,7 @@ class CourseDiscoveryTest(AcceptanceTest):
|
||||
|
||||
for i in range(12):
|
||||
org = 'test_org'
|
||||
number = "{}{}".format(str(i), str(uuid.uuid4().get_hex().upper()[0:6]))
|
||||
number = "{}{}".format(str(i), str(uuid.uuid4().hex.upper()[0:6]))
|
||||
run = "test_run"
|
||||
name = "test course" if i < 10 else "grass is always greener"
|
||||
settings = {'enrollment_start': datetime.datetime(1970, 1, 1).isoformat()}
|
||||
|
||||
@@ -31,7 +31,7 @@ class CreateCourseTest(AcceptanceTest):
|
||||
self.dashboard_page = DashboardPage(self.browser)
|
||||
self.course_name = "New Course Name"
|
||||
self.course_org = "orgX"
|
||||
self.course_number = str(uuid.uuid4().get_hex().upper()[0:6])
|
||||
self.course_number = str(uuid.uuid4().hex.upper()[0:6])
|
||||
self.course_run = "2015_T2"
|
||||
|
||||
def test_create_course_with_non_existing_org(self):
|
||||
|
||||
@@ -108,7 +108,7 @@ class TestXblockUtils(SharedModuleStoreTestCase):
|
||||
frag=fragment,
|
||||
context={"wrap_xblock_data": {"custom-attribute": "custom-value"}},
|
||||
usage_id_serializer=lambda usage_id: quote_slashes(six.text_type(usage_id)),
|
||||
request_token=uuid.uuid1().get_hex()
|
||||
request_token=uuid.uuid1().hex
|
||||
)
|
||||
self.assertIsInstance(test_wrap_output, Fragment)
|
||||
self.assertIn('xblock-baseview', test_wrap_output.content)
|
||||
|
||||
Reference in New Issue
Block a user