예제 #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)
예제 #2
0
파일: test_url.py 프로젝트: alanoe/pulp
 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)
예제 #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)
예제 #4
0
파일: test_url.py 프로젝트: alanoe/pulp
 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)