Skip to content

Commit

Permalink
Move fixtures to conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz00 committed Jun 28, 2024
1 parent 10a5701 commit 750b05f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/test_excel_report.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
import os
import pytest
import pandas as pd
from unittest.mock import patch, MagicMock
from src.client.config_manager import ConfigManager
from src.model.excel_report import ExcelReport


@pytest.fixture
def sample_patch_reports():
return [
{
"software_title": "Example Software",
"patch_released": "2024-01-01",
"hosts_patched": 10,
"missing_patch": 2,
"completion_percent": 83.33,
"total_hosts": 12,
}
]


@pytest.fixture
def temp_output_dir(tmpdir):
return str(tmpdir)


def test_export_to_excel_success(sample_patch_reports, temp_output_dir):
config_mock = MagicMock(spec=ConfigManager)
excel_report = ExcelReport(config_mock)
Expand Down

0 comments on commit 750b05f

Please # to comment.