[Pkg-privacy-commits] [obfsproxy] 118/353: Switch to twisted.trial.unittest for tests.
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:01:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfsproxy.
commit 103041141c81707e64da1d757b938f270beb620c
Author: George Kadianakis <desnacked at riseup.net>
Date: Fri Feb 8 12:35:28 2013 +0000
Switch to twisted.trial.unittest for tests.
---
obfsproxy/test/int_tests/test_pits.py | 5 ++---
obfsproxy/test/test_aes.py | 6 +++---
obfsproxy/test/test_buffer.py | 3 ++-
obfsproxy/test/transports/test_b64.py | 3 ++-
obfsproxy/test/transports/test_obfs3_dh.py | 3 ++-
5 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/obfsproxy/test/int_tests/test_pits.py b/obfsproxy/test/int_tests/test_pits.py
index 9051129..fac99d5 100644
--- a/obfsproxy/test/int_tests/test_pits.py
+++ b/obfsproxy/test/int_tests/test_pits.py
@@ -1,11 +1,10 @@
import os
import logging
+import twisted.trial.unittest
import pits
-import twisted.trial.unittest as unittest
-
-class PITSTest(unittest.TestCase):
+class PITSTest(twisted.trial.unittest.TestCase):
def setUp(self):
pass
diff --git a/obfsproxy/test/test_aes.py b/obfsproxy/test/test_aes.py
index cdc5e25..064f41c 100644
--- a/obfsproxy/test/test_aes.py
+++ b/obfsproxy/test/test_aes.py
@@ -4,9 +4,9 @@ from Crypto.Cipher import AES
from Crypto.Util import Counter
import obfsproxy.common.aes as aes
+import twisted.trial.unittest
-
-class testAES_CTR_128_NIST(unittest.TestCase):
+class testAES_CTR_128_NIST(twisted.trial.unittest.TestCase):
def _helper_test_vector(self, input_block, output_block, plaintext, ciphertext):
self.assertEqual(long(input_block.encode('hex'), 16), self.ctr.next_value())
@@ -51,7 +51,7 @@ class testAES_CTR_128_NIST(unittest.TestCase):
self._helper_test_vector(input_block, output_block, plaintext, ciphertext)
-class testAES_CTR_128_simple(unittest.TestCase):
+class testAES_CTR_128_simple(twisted.trial.unittest.TestCase):
def test_encrypt_decrypt_small_ASCII(self):
"""
Validate that decryption and encryption work as intended on a small ASCII string.
diff --git a/obfsproxy/test/test_buffer.py b/obfsproxy/test/test_buffer.py
index 6e02b16..a60dd19 100644
--- a/obfsproxy/test/test_buffer.py
+++ b/obfsproxy/test/test_buffer.py
@@ -1,8 +1,9 @@
import unittest
import obfsproxy.network.buffer as obfs_buf
+import twisted.trial.unittest
-class testBuffer(unittest.TestCase):
+class testBuffer(twisted.trial.unittest.TestCase):
def setUp(self):
self.test_string = "No pop no style, I strictly roots."
self.buf = obfs_buf.Buffer(self.test_string)
diff --git a/obfsproxy/test/transports/test_b64.py b/obfsproxy/test/transports/test_b64.py
index cb85e69..2bb98e0 100644
--- a/obfsproxy/test/transports/test_b64.py
+++ b/obfsproxy/test/transports/test_b64.py
@@ -1,8 +1,9 @@
import unittest
+import twisted.trial.unittest
import obfsproxy.transports.b64 as b64
-class test_b64_splitting(unittest.TestCase):
+class test_b64_splitting(twisted.trial.unittest.TestCase):
def _helper_splitter(self, string, expected_chunks):
chunks = b64._get_b64_chunks_from_str(string)
self.assertEqual(chunks, expected_chunks)
diff --git a/obfsproxy/test/transports/test_obfs3_dh.py b/obfsproxy/test/transports/test_obfs3_dh.py
index a81962a..ddb5a44 100644
--- a/obfsproxy/test/transports/test_obfs3_dh.py
+++ b/obfsproxy/test/transports/test_obfs3_dh.py
@@ -1,8 +1,9 @@
import unittest
+import twisted.trial.unittest
import obfsproxy.transports.obfs3_dh as obfs3_dh
-class test_uniform_dh(unittest.TestCase):
+class test_uniform_dh(twisted.trial.unittest.TestCase):
def test_uniform_dh(self):
alice = obfs3_dh.UniformDH()
bob = obfs3_dh.UniformDH()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfsproxy.git
More information about the Pkg-privacy-commits
mailing list