Skip to content

Commit 346e593

Browse files
authored
Fix sometimes flaky program filter test bug (#3364)
1 parent fe570fd commit 346e593

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

b2b/factories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class OrganizationPageFactory(wagtail_factories.PageFactory):
3535
"""OrganizationPage factory class"""
3636

3737
name = LazyAttribute(lambda _: FAKE.unique.company())
38-
org_key = LazyAttribute(lambda _: FAKE.unique.text(max_nb_chars=5))
38+
org_key = LazyAttribute(lambda _: "".join(FAKE.unique.random_letters(length=5)))
3939
org_key_prefix = UAI_COURSEWARE_ID_PREFIX
4040
description = LazyAttribute(lambda _: FAKE.unique.text())
4141
logo = None

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@ def pytest_configure(config):
8484
@pytest.fixture(autouse=True, scope="module")
8585
def fake() -> Faker:
8686
"""Fixture to provide a Faker instance"""
87+
8788
return Faker()

0 commit comments

Comments
 (0)