Skip to content

Conversation

lukaszmach
Copy link
Owner

No description provided.

@pytest.fixture
def mock_fake_credentials():
return {
'jira_base_url': 'https://your-mock-jira-server-url',
Copy link
Collaborator

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):

Copy link
Collaborator

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):
Copy link
Collaborator

@monika-pietrosian-support monika-pietrosian-support Dec 17, 2023

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):
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants