add brand account setup script (#520)

This commit is contained in:
sigma67 2024-02-04 15:21:17 +01:00 • committed by sigma67
commit 170eea358d
15 changed files with 309 additions and 262 deletions

View file

@ -14,16 +14,25 @@ These two files can be easily obtained as the default outputs of running the fol
Copy ``tests/test.cfg.example`` to ``tests/test.cfg`` to run the tests. The entry descriptions should be self-explanatory.
First, run
.. code-block:: bash
cp tests/test.example.cfg tests/test.cfg
The entry descriptions should be self-explanatory.
For the headers_raw, you need to indent the overflowing lines with a tab character. For the upload test you need a suitable music file in the test directory.
Adjust the file to contain appropriate information for your YouTube account and local setup.
Brand accounts can be created by first signing into the google account you wish to have as the parent/controlling
account then navigating `here. <https://www.youtube.com/create_channel?action_create_new_channel_redirect=true>`_
Once the brand account/channel has been created, you can obtain the account ID needed for your test.cfg by
navigating to your `google account page <https://myaccount.google.com>`_ and selecting the brand account via the
profile drop down in the top right, the brand ID should then be present in the URL.
You can populate the brand account with content using the script provided in ``tests/setup/setup_account.py``.
Coverage badge
--------------
Make sure you installed the dev requirements as explained in `CONTRIBUTING.rst <https://github.com/sigma67/ytmusicapi/blob/master/CONTRIBUTING.rst>`_. Run