Skip to content

Commit

Permalink
fix: sync_item not called with keyword arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpavlock committed Oct 8, 2022
1 parent 5cfb24e commit 7c4b65a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moe/plugins/sync/sync_core.py
Expand Up @@ -24,6 +24,6 @@ def sync_item(item: LibItem):
"""Syncs metadata from external sources and merges changes into ``item``."""
log.debug(f"Syncing metadata. [{item=!r}]")

config.CONFIG.pm.hook.sync_metadata(item)
config.CONFIG.pm.hook.sync_metadata(item=item)

log.debug(f"Synced metadata. [{item=!r}]")
6 changes: 3 additions & 3 deletions tests/plugins/sync/test_sync_core.py
Expand Up @@ -35,12 +35,12 @@ def test_sync_metadata(self, tmp_config):


class TestSyncItems:
"""Test ``sync_items()``."""
"""Test ``sync_item()``."""

def test_sync_items(self):
def test_sync_item(self):
"""Call the `sync_metadata` hook when syncing items."""
track = track_factory()

moe_sync.sync_item(track)

config.CONFIG.pm.hook.sync_metadata.assert_called_once_with(track)
config.CONFIG.pm.hook.sync_metadata.assert_called_once_with(item=track)

0 comments on commit 7c4b65a

Please sign in to comment.