Created
May 23, 2023 13:30
-
-
Save bbelderbos/b9e6a583738a509ba07df9dab4eb962c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import pytest | |
from script import get_random_emails | |
@pytest.fixture(autouse=True) | |
def set_random_seed(): | |
random.seed(123) | |
@pytest.fixture | |
def sample_emails(): | |
return [ | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
"[email protected]", | |
] | |
def test_get_random_emails(sample_emails): | |
number_emails = 3 | |
result = get_random_emails(sample_emails, number_emails) | |
expected_emails = ["[email protected]", "[email protected]", "[email protected]"] | |
assert result == expected_emails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment