예제 #1
0
파일: tests.py 프로젝트: sambacha/sprawl
    def test_invalid_batch(self):
        # add invalid flag to create_batches
        batch_list = self._create_batches(1, 1, valid_batch=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn in the batch
        batch_list = self._create_batches(1, 1, valid_txn=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn with bad batcher
        batch_list = self._create_batches(1, 1, valid_batcher=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)
예제 #2
0
    def test_invalid_batch(self):
        # add invalid flag to create_batches
        batch_list = self._create_batches(1, 1, valid_batch=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn in the batch
        batch_list = self._create_batches(1, 1, valid_txn=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)

        # create an invalid txn with bad batcher
        batch_list = self._create_batches(1, 1, valid_batcher=False)
        batch = batch_list[0]
        valid = verifier.is_valid_batch(batch)
        self.assertFalse(valid)
예제 #3
0
파일: tests.py 프로젝트: sambacha/sprawl
 def test_valid_batch(self):
     batch_list = self._create_batches(1, 10)
     batch = batch_list[0]
     valid = verifier.is_valid_batch(batch)
     self.assertTrue(valid)
예제 #4
0
 def test_valid_batch(self):
     batch_list = self._create_batches(1, 10)
     batch = batch_list[0]
     valid = verifier.is_valid_batch(batch)
     self.assertTrue(valid)
def test_valid_batch():
    testMessageValidation = TestMessageValidation()
    batch_list = testMessageValidation._create_batches(1, 10)
    batch = batch_list[0]
    valid = verifier.is_valid_batch(batch)
    testMessageValidation.assertTrue(valid)