testing-zindi-package icon indicating copy to clipboard operation
testing-zindi-package copied to clipboard

Tests

Open LeMeteore opened this issue 2 years ago • 0 comments

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

LeMeteore avatar May 15 '22 22:05 LeMeteore