Guest User

Untitled

a guest
Oct 28th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.26 KB | None | 0 0
  1. Testing started at 16:51 ...
  2. C:\Users\chupina.anastasia\PycharmProjects\start\env\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2018.2\helpers\pycharm\_jb_pytest_runner.py" --path C:/Users/chupina.anastasia/PycharmProjects/start/test/test_db_matches_ui1.py
  3. Launching pytest with arguments C:/Users/chupina.anastasia/PycharmProjects/start/test/test_db_matches_ui1.py in C:\Users\chupina.anastasia\PycharmProjects\start\test
  4.  
  5. ============================= test session starts =============================
  6. platform win32 -- Python 3.6.3, pytest-3.7.4, py-1.6.0, pluggy-0.7.1
  7. rootdir: C:\Users\chupina.anastasia\PycharmProjects\start\test, inifile:collected 1 item
  8.  
  9. test_db_matches_ui1.py E
  10. test setup failed
  11. self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
  12.  
  13. def open_connection(self):
  14. """Open the TCP/IP connection to the MySQL server
  15. """
  16. # Get address information
  17. addrinfo = [None] * 5
  18. try:
  19. addrinfos = socket.getaddrinfo(self.server_host,
  20. self.server_port,
  21. 0, socket.SOCK_STREAM,
  22. socket.SOL_TCP)
  23. # If multiple results we favor IPv4, unless IPv6 was forced.
  24. for info in addrinfos:
  25. if self.force_ipv6 and info[0] == socket.AF_INET6:
  26. addrinfo = info
  27. break
  28. elif info[0] == socket.AF_INET:
  29. addrinfo = info
  30. break
  31. if self.force_ipv6 and addrinfo[0] is None:
  32. raise errors.InterfaceError(
  33. "No IPv6 address found for {0}".format(self.server_host))
  34. if addrinfo[0] is None:
  35. addrinfo = addrinfos[0]
  36. except IOError as err:
  37. raise errors.InterfaceError(
  38. errno=2003, values=(self.get_address(), _strioerror(err)))
  39. else:
  40. (self._family, socktype, proto, _, sockaddr) = addrinfo
  41.  
  42. # Instanciate the socket and connect
  43. try:
  44. self.sock = socket.socket(self._family, socktype, proto)
  45. self.sock.settimeout(self._connection_timeout)
  46. > self.sock.connect(sockaddr)
  47. E ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
  48.  
  49. ..\env\lib\site-packages\mysql\connector\network.py:525: ConnectionRefusedError
  50.  
  51. During handling of the above exception, another exception occurred:
  52.  
  53. request = <SubRequest 'db' for <Function 'test_group_list'>>
  54.  
  55. @pytest.fixture(scope="session")
  56. def db(request):
  57. db_config = load_config(request.config.getoption("--target"))['db']
  58. > dbfixture = DbFixture(host = db_config['host'], database = db_config['database'], user = db_config['user'], password = db_config['password'])
  59.  
  60. ..\conftest.py:38:
  61. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  62. ..\fixture\db.py:13: in __init__
  63. self.connection = mysql.connector.connect(host=host, database = database, user = user, password = password)
  64. ..\env\lib\site-packages\mysql\connector\__init__.py:173: in connect
  65. return MySQLConnection(*args, **kwargs)
  66. ..\env\lib\site-packages\mysql\connector\connection.py:102: in __init__
  67. self.connect(**kwargs)
  68. ..\env\lib\site-packages\mysql\connector\abstracts.py:731: in connect
  69. self._open_connection()
  70. ..\env\lib\site-packages\mysql\connector\connection.py:245: in _open_connection
  71. self._socket.open_connection()
  72. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  73.  
  74. self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
  75.  
  76. def open_connection(self):
  77. """Open the TCP/IP connection to the MySQL server
  78. """
  79. # Get address information
  80. addrinfo = [None] * 5
  81. try:
  82. addrinfos = socket.getaddrinfo(self.server_host,
  83. self.server_port,
  84. 0, socket.SOCK_STREAM,
  85. socket.SOL_TCP)
  86. # If multiple results we favor IPv4, unless IPv6 was forced.
  87. for info in addrinfos:
  88. if self.force_ipv6 and info[0] == socket.AF_INET6:
  89. addrinfo = info
  90. break
  91. elif info[0] == socket.AF_INET:
  92. addrinfo = info
  93. break
  94. if self.force_ipv6 and addrinfo[0] is None:
  95. raise errors.InterfaceError(
  96. "No IPv6 address found for {0}".format(self.server_host))
  97. if addrinfo[0] is None:
  98. addrinfo = addrinfos[0]
  99. except IOError as err:
  100. raise errors.InterfaceError(
  101. errno=2003, values=(self.get_address(), _strioerror(err)))
  102. else:
  103. (self._family, socktype, proto, _, sockaddr) = addrinfo
  104.  
  105. # Instanciate the socket and connect
  106. try:
  107. self.sock = socket.socket(self._family, socktype, proto)
  108. self.sock.settimeout(self._connection_timeout)
  109. self.sock.connect(sockaddr)
  110. except IOError as err:
  111. raise errors.InterfaceError(
  112. > errno=2003, values=(self.get_address(), _strioerror(err)))
  113. E mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (10061 No connection could be made because the target machine actively refused it)
  114.  
  115. ..\env\lib\site-packages\mysql\connector\network.py:528: InterfaceError
  116. E
  117. test_db_matches_ui1.py:3 (test_group_list)
  118. tp = <class 'AttributeError'>, value = None, tb = None
  119.  
  120. def reraise(tp, value, tb=None):
  121. try:
  122. if value is None:
  123. value = tp()
  124. if value.__traceback__ is not tb:
  125. raise value.with_traceback(tb)
  126. > raise value
  127.  
  128. ..\env\lib\site-packages\six.py:693:
  129. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  130. ..\env\lib\site-packages\six.py:693: in reraise
  131. raise value
  132. ..\env\lib\site-packages\six.py:693: in reraise
  133. raise value
  134. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  135.  
  136. def fin():
  137. > fixture.session.ensure_logout()
  138. E AttributeError: 'NoneType' object has no attribute 'session'
  139.  
  140. ..\conftest.py:48: AttributeError
  141. [100%]
  142.  
  143. =================================== ERRORS ====================================
  144. ______________________ ERROR at setup of test_group_list ______________________
  145.  
  146. self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
  147.  
  148. def open_connection(self):
  149. """Open the TCP/IP connection to the MySQL server
  150. """
  151. # Get address information
  152. addrinfo = [None] * 5
  153. try:
  154. addrinfos = socket.getaddrinfo(self.server_host,
  155. self.server_port,
  156. 0, socket.SOCK_STREAM,
  157. socket.SOL_TCP)
  158. # If multiple results we favor IPv4, unless IPv6 was forced.
  159. for info in addrinfos:
  160. if self.force_ipv6 and info[0] == socket.AF_INET6:
  161. addrinfo = info
  162. break
  163. elif info[0] == socket.AF_INET:
  164. addrinfo = info
  165. break
  166. if self.force_ipv6 and addrinfo[0] is None:
  167. raise errors.InterfaceError(
  168. "No IPv6 address found for {0}".format(self.server_host))
  169. if addrinfo[0] is None:
  170. addrinfo = addrinfos[0]
  171. except IOError as err:
  172. raise errors.InterfaceError(
  173. errno=2003, values=(self.get_address(), _strioerror(err)))
  174. else:
  175. (self._family, socktype, proto, _, sockaddr) = addrinfo
  176.  
  177. # Instanciate the socket and connect
  178. try:
  179. self.sock = socket.socket(self._family, socktype, proto)
  180. self.sock.settimeout(self._connection_timeout)
  181. > self.sock.connect(sockaddr)
  182. E ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
  183.  
  184. ..\env\lib\site-packages\mysql\connector\network.py:525: ConnectionRefusedError
  185.  
  186. During handling of the above exception, another exception occurred:
  187.  
  188. request = <SubRequest 'db' for <Function 'test_group_list'>>
  189.  
  190. @pytest.fixture(scope="session")
  191. def db(request):
  192. db_config = load_config(request.config.getoption("--target"))['db']
  193. > dbfixture = DbFixture(host = db_config['host'], database = db_config['database'], user = db_config['user'], password = db_config['password'])
  194.  
  195. ..\conftest.py:38:
  196. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  197. ..\fixture\db.py:13: in __init__
  198. self.connection = mysql.connector.connect(host=host, database = database, user = user, password = password)
  199. ..\env\lib\site-packages\mysql\connector\__init__.py:173: in connect
  200. return MySQLConnection(*args, **kwargs)
  201. ..\env\lib\site-packages\mysql\connector\connection.py:102: in __init__
  202. self.connect(**kwargs)
  203. ..\env\lib\site-packages\mysql\connector\abstracts.py:731: in connect
  204. self._open_connection()
  205. ..\env\lib\site-packages\mysql\connector\connection.py:245: in _open_connection
  206. self._socket.open_connection()
  207. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  208.  
  209. self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
  210.  
  211. def open_connection(self):
  212. """Open the TCP/IP connection to the MySQL server
  213. """
  214. # Get address information
  215. addrinfo = [None] * 5
  216. try:
  217. addrinfos = socket.getaddrinfo(self.server_host,
  218. self.server_port,
  219. 0, socket.SOCK_STREAM,
  220. socket.SOL_TCP)
  221. # If multiple results we favor IPv4, unless IPv6 was forced.
  222. for info in addrinfos:
  223. if self.force_ipv6 and info[0] == socket.AF_INET6:
  224. addrinfo = info
  225. break
  226. elif info[0] == socket.AF_INET:
  227. addrinfo = info
  228. break
  229. if self.force_ipv6 and addrinfo[0] is None:
  230. raise errors.InterfaceError(
  231. "No IPv6 address found for {0}".format(self.server_host))
  232. if addrinfo[0] is None:
  233. addrinfo = addrinfos[0]
  234. except IOError as err:
  235. raise errors.InterfaceError(
  236. errno=2003, values=(self.get_address(), _strioerror(err)))
  237. else:
  238. (self._family, socktype, proto, _, sockaddr) = addrinfo
  239.  
  240. # Instanciate the socket and connect
  241. try:
  242. self.sock = socket.socket(self._family, socktype, proto)
  243. self.sock.settimeout(self._connection_timeout)
  244. self.sock.connect(sockaddr)
  245. except IOError as err:
  246. raise errors.InterfaceError(
  247. > errno=2003, values=(self.get_address(), _strioerror(err)))
  248. E mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (10061 No connection could be made because the target machine actively refused it)
  249.  
  250. ..\env\lib\site-packages\mysql\connector\network.py:528: InterfaceError
  251. ____________________ ERROR at teardown of test_group_list _____________________
  252.  
  253. tp = <class 'AttributeError'>, value = None, tb = None
  254.  
  255. def reraise(tp, value, tb=None):
  256. try:
  257. if value is None:
  258. value = tp()
  259. if value.__traceback__ is not tb:
  260. raise value.with_traceback(tb)
  261. > raise value
  262.  
  263. ..\env\lib\site-packages\six.py:693:
  264. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  265. ..\env\lib\site-packages\six.py:693: in reraise
  266. raise value
  267. ..\env\lib\site-packages\six.py:693: in reraise
  268. raise value
  269. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  270.  
  271. def fin():
  272. > fixture.session.ensure_logout()
  273. E AttributeError: 'NoneType' object has no attribute 'session'
  274.  
  275. ..\conftest.py:48: AttributeError
  276. =========================== 2 error in 1.37 seconds ===========================
  277. Process finished with exit code 0
Add Comment
Please, Sign In to add comment