Skip to content

Commit

Permalink
Add 'audio files' in stub vault
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarragher committed Oct 19, 2021
1 parent 100b66d commit f03c391
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_api_vault_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def expected_metadata_dict():
'Tydides': np.NaN,
'Dives': np.NaN,
'Aetna': np.NaN},
'n_embedded_files': {'Sussudio': 0.0,
'n_embedded_files': {'Sussudio': 2.0,
'Brevissimus moenia': 0.0,
'Ne fuit': 0.0,
'Alimenta': 0.0,
Expand All @@ -106,7 +106,7 @@ def expected_metadata_dict():

@pytest.fixture
def expected_embedded_files_index():
return {'Sussudio': [],
return {'Sussudio': ['Sussudio.mp3', '1999.flac'],
'Brevissimus moenia': [],
'Ne fuit': [],
'Alimenta': [],
Expand Down Expand Up @@ -363,6 +363,13 @@ def test_front_matter_sussudio(actual_connected_vault):
assert actual_fm == expected_fm


def test_embedded_files_sussudio(actual_connected_vault):
expected_files = ['Sussudio.mp3', '1999.flac']

actual_files = actual_connected_vault.get_embedded_files('Sussudio')
assert actual_files == expected_files


def test_nodes_gte_files(actual_connected_vault):
act_f_len = len(actual_connected_vault.file_index)
act_n_len = len(actual_connected_vault.wikilinks_index)
Expand Down Expand Up @@ -407,3 +414,8 @@ def test_md_links_not_existing(actual_connected_vault):
def test_front_matter_not_existing(actual_connected_vault):
with pytest.raises(ValueError):
actual_connected_vault.get_front_matter('Tarpeia')


def test_embedded_notes_not_existing(actual_connected_vault):
with pytest.raises(ValueError):
actual_connected_vault.get_embedded_files('Tarpeia')
4 changes: 4 additions & 0 deletions tests/vault-stub/Sussudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ Another word with absolutely no meaning 😄

This will be a note inside the vault dir. Others will be lipsum in a subdirectory.

![[Sussudio.mp3]]

The song has been compared to the Prince's "1999" ( #y1982 ) <- oh look, a tag!

![[1999.flac]]

More tags:
- #y_1982
- #y-1982
Expand Down

0 comments on commit f03c391

Please sign in to comment.