testing-zindi-package
testing-zindi-package copied to clipboard
Tests
I'm not sure this file is useful. Or maybe I don't understand what is your intent. What is the real purpose of the dev-test.ipynb
file ?
Somewhere inside test_user.py
, I can read:
user = Zindian(username=USERNAME, fixed_password=PASSWORD)
self.assertIsInstance(
user,
Zindian,
)
Here, you're not really testing that the user is logged in.You're just verifying that user is an object made with the Zindi class. Maybe there should be an attribute like is_authenticated
that s true is logged in and false if not logged in. For example:
user = Zindian(username=GOODUSERNAME, fixed_password=GOODPASSWORD)
assert user.is_authenticated
Or:
user = Zindian(username=GOODUSERNAME, fixed_password=GOODPASSWORD)
assert not user.is_authenticated
Lots of your tests do not contains assertions. I guess, you're not done and you're still working on them. Also, why using Unittest ? That's for old people :older_man: . You're young, you should use Pytest