'Test signing a tick'

def test_signature(self):

    eccrypto = ECCrypto()
    keypair = eccrypto.generate_key(u'curve25519')
    sign_member = MockObject()
    sign_member.public_key = eccrypto.key_to_bin(keypair.pub())
    sign_member.private_key = keypair
    self.tick.sign(sign_member)
    self.assertFalse(self.tick.has_valid_signature())
    self.tick._order_id = OrderId(TraderId(hashlib.sha1(sign_member.public_key).digest().encode('hex')), OrderNumber(1))
    self.assertTrue(self.tick.has_valid_signature())
    self.tick._signature = ('a' * 64)
    self.assertFalse(self.tick.has_valid_signature())
