I have a private method in a module, for example
wallets.py
def __foo():
return 0
When I try to test this method with this code
test_wallets.py
from unittest import TestCase
from db.services import wallets
class GetTokenQuantity(TestCase):
def test_get_token_quantity(self):
token_quantity = wallets.__foo()
I get this error AttributeError: module 'db.services.wallets' has no attribute '_GetTokenQuantity__foo'
How can I test this private method?