-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplify and refactor tests #6
base: master
Are you sure you want to change the base?
Conversation
@pytest.fixture | ||
def mock_fake_credentials(): | ||
return { | ||
'jira_base_url': 'https://your-mock-jira-server-url', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Być może jest sens użyć tego fixture również w test_load_settings_file_exists
} | ||
|
||
|
||
def test_jira_authentication_success(mock_fake_user, mock_fake_credentials): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Można ujednolicić formatowanie, aby po deklaracji funkcji była zawsze albo nie było wcale pustej linii
attachment1 = MockAttachment('?!?/?!', b'content1') | ||
attachment2 = MockAttachment('file2.txt', b'content2') | ||
return MockIssue(attachments=[attachment1, attachment2]) | ||
|
||
|
||
def test_download_attachments_validate_files_and_contents_goodfiles(tmpdir, mock_jira_issue_good_files): | ||
def test_download_attachments_validate_files_and_contents_goodfiles(tmpdir, mock_jira_issue_valid_files): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valid_files
na końcu nazwy funkcji
with open(attachment_path, 'rb') as file: | ||
assert file.read() == attachment.content | ||
|
||
|
||
def test_download_attachments_validate_files_and_contents_bad_files(tmpdir, mock_jira_issue_bad_files): | ||
def test_download_attachments_validate_files_and_contents_bad_files(tmpdir, mock_jira_issue_invalid_files): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid_files
na końcu nazwy funkcji
No description provided.