Esempio n. 1
0
 def test_decode(self, json):
     s = '1234'
     decoded = JSON.decode(s)
     json.loads.assert_called_once_with(s)
     self.assertEqual(decoded, json.loads.return_value)
Esempio n. 2
0
 def test_decode(self, json):
     s = '1234'
     decoded = JSON.decode(s)
     json.loads.assert_called_once_with(s)
     self.assertEqual(decoded, json.loads.return_value)
Esempio n. 3
0
 def test_encode(self, json):
     s = '1234'
     encoded = JSON.encode(s)
     json.dumps.assert_called_once_with(s)
     self.assertEqual(encoded, json.dumps.return_value)
Esempio n. 4
0
 def test_encode(self, json):
     s = '1234'
     encoded = JSON.encode(s)
     json.dumps.assert_called_once_with(s)
     self.assertEqual(encoded, json.dumps.return_value)