RikSchoonbeek / crypto-prices

0 stars 0 forks source link

write functionality to get available cryptocurrencies from exchanges #3

Closed RikSchoonbeek closed 5 years ago

RikSchoonbeek commented 5 years ago

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.

RikSchoonbeek commented 5 years ago

Finished the functionality to add Kraken currencies

in cryptodata.management.commands.get_exchange_data

RikSchoonbeek commented 5 years ago

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

RikSchoonbeek commented 5 years ago

Kraken is done, still needs to be done:

RikSchoonbeek commented 5 years ago

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

RikSchoonbeek commented 5 years ago

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.

RikSchoonbeek commented 5 years ago

Test finished, and the code to add currencies for: