Beispiel #1
0
 def test__bool_true(self):
     input = True
     expected_output = "true"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #2
0
 def test__null_chararray(self):
     input = None
     expected_output = "|-_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #3
0
 def test__num(self):
     input = 1234
     expected_output = "1234"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #4
0
 def test__map(self):
     input = {'a': 1, 'b':'z'}
     expected_output = "|[_a#1|,_b#z|]_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #5
0
 def test__null_chararray(self):
     input = None
     expected_output = "|-_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #6
0
 def test__tuple(self):
     input = (1234, "abc")
     expected_output = "|(_1234|,_abc|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #7
0
 def test__bag(self):
     input = [1234, "abc"]
     expected_output = "|{_1234|,_abc|}_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #8
0
 def test__short_tuple(self):
     input = (1, )
     expected_output = "|(_1|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #9
0
 def test__bag(self):
     input = [1234, "abc"]
     expected_output = "|{_1234|,_abc|}_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #10
0
 def test__datetime(self):
     d = datetime.now()
     input = (d, )
     expected_output = "|(_%s|)_" % d.isoformat()
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #11
0
 def test__tuple(self):
     input = (1234, "abc")
     expected_output = "|(_1234|,_abc|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #12
0
 def test__bool_false(self):
     input = False
     expected_output = "false"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #13
0
 def test__bool_true(self):
     input = True
     expected_output = "true"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #14
0
 def test__num(self):
     input = 1234
     expected_output = "1234"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #15
0
 def test__bool_false(self):
     input = False
     expected_output = "false"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #16
0
 def test__nested_tuple(self):
     input = [(32, 12, 'abc'), 32, ['abc', 'def', 'ghi']]
     expected_output = "|{_|(_32|,_12|,_abc|)_|,_32|,_|{_abc|,_def|,_ghi|}_|}_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #17
0
 def test__datetime(self):
     d = datetime.now()
     input = (d,)
     expected_output = "|(_%s|)_" % d.isoformat()
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #18
0
 def test__map(self):
     input = {'a': 1, 'b': 'z'}
     expected_output = "|[_a#1|,_b#z|]_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #19
0
 def test__short_tuple(self):
     input = (1,)
     expected_output = "|(_1|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #20
0
 def test__bug(self):
     input = (None, 32, 98765432109876543210L)
     expected_output = "|(_|-_|,_32|,_98765432109876543210|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #21
0
 def test__nested_tuple(self):
     input = [(32,12,'abc'), 32, ['abc', 'def', 'ghi']]
     expected_output = "|{_|(_32|,_12|,_abc|)_|,_32|,_|{_abc|,_def|,_ghi|}_|}_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #22
0
 def test__empty_chararray(self):
     input = ""
     expected_output = ""
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #23
0
 def test__bug(self):
     input = (None, 32, 98765432109876543210L)
     expected_output = "|(_|-_|,_32|,_98765432109876543210|)_"
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)
Beispiel #24
0
 def test__empty_chararray(self):
     input = ""
     expected_output = ""
     out = controller.serialize_output(input)
     self.assertEquals(expected_output, out)