Example #1
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         IntTypeCase.decode(self.wrong_type_input)
Example #2
0
 def test_decode_RETURN_INT(self):    
     assert IntTypeCase.decode(str(self.i)) == self.i
Example #3
0
 def test_decode_RETURN_LONG(self):
     assert IntTypeCase.decode(str(self.l)) == self.l
Example #4
0
 def test_encode_ACCEPT_LONG(self):
     assert IntTypeCase.encode(self.l) == self.l
Example #5
0
 def test_decode_RETURN_NONE(self):
     assert IntTypeCase.decode(None) == None
Example #6
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         IntTypeCase.decode(self.wrong_type_input)
Example #7
0
 def test_encode_ACCEPT_INT(self):
     assert IntTypeCase.encode(self.i) == self.i
Example #8
0
 def test_decode_RETURN_LONG(self):
     assert IntTypeCase.decode(str(self.l)) == self.l
Example #9
0
 def test_decode_RETURN_INT(self):
     assert IntTypeCase.decode(str(self.i)) == self.i
Example #10
0
 def test_decode_RETURN_NONE(self):
     assert IntTypeCase.decode(None) == None
Example #11
0
 def test_encode_ACCEPT_LONG(self):
     assert IntTypeCase.encode(self.l) == self.l
Example #12
0
 def test_encode_ACCEPT_INT(self):
     assert IntTypeCase.encode(self.i) == self.i