Skip to content

Commit

Permalink
test: Rename items to make location clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Nov 2, 2024
1 parent 85740f1 commit 1cd6275
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
from .helpers.mock_config_entry import MS365MockConfigEntry
from .helpers.utils import build_token_file
from .integration import permissions
from .integration.const import (
from .integration.const_integration import (
BASE_CONFIG_ENTRY,
BASE_TOKEN_PERMS,
DOMAIN,
UPDATE_TOKEN_PERMS,
)
from .integration.helpers.mocks import MS365MOCKS
from .integration.helpers_integration.mocks import MS365MOCKS

pytest_plugins = [
"pytest_homeassistant_custom_component",
Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pathlib import Path

from ..const import ENTITY_NAME, TEST_DATA_LOCATION, TOKEN_LOCATION, TOKEN_PARAMS
from ..integration.const import DOMAIN
from ..integration.const_integration import DOMAIN

TOKEN_TIME = 5000

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/integration/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from custom_components.ms365_calendar.integration import filemgmt_integration

from ..const import STORAGE_LOCATION
from .const import DOMAIN
from .const_integration import DOMAIN


@pytest.fixture(autouse=True)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import timedelta

from ...helpers.utils import mock_call, utcnow
from ..const import URL
from ..const_integration import URL


class MS365Mocks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from ...const import STORAGE_LOCATION, TEST_DATA_LOCATION
from ...helpers.mock_config_entry import MS365MockConfigEntry
from ..const import UPDATE_CALENDAR_LIST
from ..const_integration import UPDATE_CALENDAR_LIST


def yaml_setup(tmpdir, infile):
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from ..data.state import BASE_STATE_CAL1, BASE_STATE_CAL2
from ..helpers.mock_config_entry import MS365MockConfigEntry
from ..helpers.utils import check_entity_state, utcnow
from .helpers.mocks import MS365MOCKS
from .helpers.utils import update_options, yaml_setup
from .helpers_integration.mocks import MS365MOCKS
from .helpers_integration.utils_integration import update_options, yaml_setup

START_BASE = datetime(2020, 1, 1, 0, 0, 0, tzinfo=ZoneInfo(key="UTC"))
END_BASE = datetime(2020, 1, 1, 23, 59, 59, tzinfo=ZoneInfo(key="UTC"))
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

from ..helpers.mock_config_entry import MS365MockConfigEntry
from ..helpers.utils import get_schema_default
from .const import UPDATE_CALENDAR_LIST
from .helpers.mocks import MS365MOCKS
from .const_integration import UPDATE_CALENDAR_LIST
from .helpers_integration.mocks import MS365MOCKS


async def test_options_flow(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_filemgmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from requests_mock import Mocker

from ..helpers.mock_config_entry import MS365MockConfigEntry
from .helpers.mocks import MS365MOCKS
from .helpers.utils import check_yaml_file_contents, yaml_setup
from .helpers_integration.mocks import MS365MOCKS
from .helpers_integration.utils_integration import check_yaml_file_contents, yaml_setup


async def test_base_filemgmt(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
)

from ..helpers.mock_config_entry import MS365MockConfigEntry
from .const import UPDATE_CALENDAR_LIST
from .const_integration import UPDATE_CALENDAR_LIST


async def test_reload(
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from ..helpers.mock_config_entry import MS365MockConfigEntry
from ..helpers.utils import build_token_file, token_setup
from .helpers.mocks import MS365MOCKS
from .helpers_integration.mocks import MS365MOCKS

### Note that permissions code also supports Presence/Send which are not present in the calendar integration

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from ..conftest import MS365MockConfigEntry
from ..helpers.utils import mock_call
from .const import URL
from .const_integration import URL
from .fixtures import ClientFixture, ListenerSetupData

START_BASE = datetime(2020, 1, 1, 0, 0, 0, tzinfo=ZoneInfo(key="UTC"))
Expand Down
4 changes: 2 additions & 2 deletions tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .const import CLIENT_ID, ENTITY_NAME, TOKEN_URL_ASSERT
from .helpers.mock_config_entry import MS365MockConfigEntry
from .helpers.utils import build_token_url, mock_token
from .integration.const import (
from .integration.const_integration import (
ALT_CONFIG_ENTRY,
AUTH_CALLBACK_PATH_ALT,
AUTH_CALLBACK_PATH_DEFAULT,
Expand All @@ -22,7 +22,7 @@
DOMAIN,
RECONFIGURE_CONFIG_ENTRY,
)
from .integration.helpers.mocks import MS365MOCKS
from .integration.helpers_integration.mocks import MS365MOCKS


async def test_default_flow(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from .helpers.mock_config_entry import MS365MockConfigEntry
from .integration import async_get_config_entry_diagnostics
from .integration.const import (
from .integration.const_integration import (
DIAGNOSTIC_GRANTED_PERMISSIONS,
DIAGNOSTIC_REQUESTED_PERMISSIONS,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from requests_mock import Mocker

from .helpers.mock_config_entry import MS365MockConfigEntry
from .integration.const import FULL_INIT_ENTITY_NO
from .integration.helpers.mocks import MS365MOCKS
from .integration.const_integration import FULL_INIT_ENTITY_NO
from .integration.helpers_integration.mocks import MS365MOCKS


async def test_full_init(
Expand Down

0 comments on commit 1cd6275

Please sign in to comment.