def testGetSignatureFromSequence(self):
    bits = 1024
    good_seq = [1] * bits
    good_sig = (bits/8) * 'x'

    self.mox.StubOutWithMock(x509.der_encoder, 'encode', True)
    x509.der_encoder.encode(good_seq).AndReturn('junkJunkJUNK%s' % good_sig)

    self.mox.ReplayAll()
    output = self.x._GetSignatureFromSequence(good_seq)
    self._CheckSaneCertFields(output)
    self.assertEqual(output['sig_data'], good_sig)
    self.mox.VerifyAll()
Record transaction
dataset/ETHPy150Open google/simian/src/tests/simian/auth/x509_test.py/X509CertificateTest.testGetSignatureFromSequence--crossover with--dataset/ETHPy150Open jcbagneris/fms/fms/contrib/coleman/agents/avgbuyselltrader.py/AvgBuySellTrader.record