def test_login(self, model: Model): assert not model.login() model._names = ['', 'a'] model._name_mapping = {'a': '1234'} model.set_name_index(1) model.set_pin('1234') assert model.login() model.set_pin('5678') assert not model.login()
def test_name(self, model: Model): assert model.name is None model._name_index = 1 model._names = ['', 'a', 'b'] assert model.name == 'a'
def test_names(self, model: Model): assert model.names == [] model._names = ['', 'a', 'b'] assert model.names == ['', 'a', 'b']