예제 #1
0
 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()
예제 #2
0
 def test_name(self, model: Model):
     assert model.name is None
     model._name_index = 1
     model._names = ['', 'a', 'b']
     assert model.name == 'a'
예제 #3
0
 def test_names(self, model: Model):
     assert model.names == []
     model._names = ['', 'a', 'b']
     assert model.names == ['', 'a', 'b']