Fixed problem when connection lost during request executing and nothing was happened, now it raises an exception.

This commit is contained in:
evgeny.ezhov 2017-11-27 22:16:17 +03:00
parent 378afe5890
commit 44ec8fcc66
4 changed files with 35 additions and 3 deletions

View file

@ -1,5 +1,6 @@
import os.path
import shutil
import unittest
from io import BytesIO, StringIO
from os import path
from unittest import TestCase
@ -188,3 +189,7 @@ class ClientTestCase(TestCase):
os.mkdir(self.local_path_dir)
if not path.exists(path=self.local_path_dir + os.sep + self.local_path_file):
shutil.copy(src=self.local_path_file, dst=self.local_path_dir + os.sep + self.local_path_file)
if __name__ == '__main__':
unittest.main()

View file

@ -1,3 +1,4 @@
import unittest
from unittest import TestCase
from lxml.etree import ElementTree, Element
@ -93,3 +94,7 @@ class ClientTestCase(TestCase):
tree = ElementTree(Element('test'))
result = utils.etree_to_string(tree)
self.assertEquals(result, '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<test/>')
if __name__ == '__main__':
unittest.main()