requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
+[tool.pytest.ini_options]
+markers = [
+ "yt: mark youtube importer tests",
+]
login(session, "user", "1234asdf!@#$")
yield session
+def pytest_addoption(parser):
+ parser.addoption("--yt", action="store_true", help="run youtube importer tests")
+
+def pytest_collection_modifyitems(config, items):
+ if not config.option.yt:
+ removed_items = [i for i in items if "yt" in i.keywords]
+ for ri in removed_items:
+ items.remove(ri)
+ config.hook.pytest_deselected(items=removed_items)
+
songs = _get_song_list_from_page(response.text)
assert not any(song["songid"] == songid for song in songs)
-@pytest.mark.skip
+@pytest.mark.yt
def test_upload_song_from_youtube(session):
login(session, "user", "1234asdf!@#$")
create_user(client, "user", "password", login=True)
upload_song(client, b"Successfully uploaded 'song title'", filename=TEST_DATA/"sample-4s.mp4")
-@pytest.mark.skip
+@pytest.mark.yt
def test_upload_song_from_youtube(client):
create_user(client, "user", "password", login=True)
data = {
with open(TEST_DATA/"sample-6s.mp3", "rb") as expected_file:
assert response.data == expected_file.read()
-@pytest.mark.skip
+@pytest.mark.yt
def test_update_song_from_youtube(client):
create_user_and_song(client)
data = {