Exemple #1
0
 def test_failed(self, _document):
     # TypeError
     document = load(1234)
     self.assertEqual(document, _document.return_value)
     # ValueError
     document = load('[[[')
     self.assertEqual(document, _document.return_value)
Exemple #2
0
 def test_failed(self, _document):
     # TypeError
     document = load(1234)
     self.assertEqual(document, _document.return_value)
     # ValueError
     document = load('[[[')
     self.assertEqual(document, _document.return_value)
Exemple #3
0
 def test_load(self):
     document = load('{"A": 1}')
     self.assertTrue(isinstance(document, Document))
     self.assertEqual(document['A'], 1)
Exemple #4
0
 def test_load(self):
     document = load('{"A": 1}')
     self.assertTrue(isinstance(document, Document))
     self.assertEqual(document['A'], 1)