Closed RikSchoonbeek closed 5 years ago
Finished the functionality to add Kraken currencies
in cryptodata.management.commands.get_exchange_data
The CurrencyExchangePK's are not added to the db, now I want to go over the Django VSCode tutorial to learn how to work with Django in VSCode, INCLUDING DEBUGGING. Think it's wise to go over full tut:
https://code.visualstudio.com/docs/python/tutorial-django
get_exchange_data
should do, and see if it does all.Kraken is done, still needs to be done:
I am currently writing a test for the get_exchange_available_currencies management command.
Why?
Because I expect I will have to edit that management command significantly a couple of times, because of adding new exchanges. And it takes a lot of time to test it manually every time.
Writing a new management command to test this:
test_get_exchange_available_currencies
NOW: Working on test_currencies
Just written test_currencies_have_exchange_pk
but I realize I should adjust my last test, what should I test: Test if each Currency has a CurrencyExchangePK for each exchange in currency.exchanges
This means that I should check all CurrencyExchangePKs related to a currency (currencies filtered to have at least one related exchange), and check if the exchange related to that CurrencyExchangePK is also in it's related Currency's exchanges.
If this is not the case, something went wrong.
Test finished, and the code to add currencies for:
If coin is not in Database yet AND some if the needed data is missing (like the name in case of Kraken), then have the user enter the data manually.