def test_it_should_hash_passwords(self): account = Account.create('jeff', 'password') # sha512 hashed = 'b109f3bbbc244eb82441917ed06d618b9008dd09b3befd1b5e07394c706a8bb980b1d7785e5976ec049b46df5f1326af5a2ea6d103fd07c95385ffab0cacbc86' expect(account) == Account('jeff', hashed)
def test_it_can_be_in_dictionary(self): container = { Account('user1', 'pwd1'): 1, } expect(container[Account('user1', 'pwd1')]) == 1