Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Testing started at 16:51 ...
- 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
- Launching pytest with arguments C:/Users/chupina.anastasia/PycharmProjects/start/test/test_db_matches_ui1.py in C:\Users\chupina.anastasia\PycharmProjects\start\test
- ============================= test session starts =============================
- platform win32 -- Python 3.6.3, pytest-3.7.4, py-1.6.0, pluggy-0.7.1
- rootdir: C:\Users\chupina.anastasia\PycharmProjects\start\test, inifile:collected 1 item
- test_db_matches_ui1.py E
- test setup failed
- self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
- def open_connection(self):
- """Open the TCP/IP connection to the MySQL server
- """
- # Get address information
- addrinfo = [None] * 5
- try:
- addrinfos = socket.getaddrinfo(self.server_host,
- self.server_port,
- 0, socket.SOCK_STREAM,
- socket.SOL_TCP)
- # If multiple results we favor IPv4, unless IPv6 was forced.
- for info in addrinfos:
- if self.force_ipv6 and info[0] == socket.AF_INET6:
- addrinfo = info
- break
- elif info[0] == socket.AF_INET:
- addrinfo = info
- break
- if self.force_ipv6 and addrinfo[0] is None:
- raise errors.InterfaceError(
- "No IPv6 address found for {0}".format(self.server_host))
- if addrinfo[0] is None:
- addrinfo = addrinfos[0]
- except IOError as err:
- raise errors.InterfaceError(
- errno=2003, values=(self.get_address(), _strioerror(err)))
- else:
- (self._family, socktype, proto, _, sockaddr) = addrinfo
- # Instanciate the socket and connect
- try:
- self.sock = socket.socket(self._family, socktype, proto)
- self.sock.settimeout(self._connection_timeout)
- > self.sock.connect(sockaddr)
- E ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
- ..\env\lib\site-packages\mysql\connector\network.py:525: ConnectionRefusedError
- During handling of the above exception, another exception occurred:
- request = <SubRequest 'db' for <Function 'test_group_list'>>
- @pytest.fixture(scope="session")
- def db(request):
- db_config = load_config(request.config.getoption("--target"))['db']
- > dbfixture = DbFixture(host = db_config['host'], database = db_config['database'], user = db_config['user'], password = db_config['password'])
- ..\conftest.py:38:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ..\fixture\db.py:13: in __init__
- self.connection = mysql.connector.connect(host=host, database = database, user = user, password = password)
- ..\env\lib\site-packages\mysql\connector\__init__.py:173: in connect
- return MySQLConnection(*args, **kwargs)
- ..\env\lib\site-packages\mysql\connector\connection.py:102: in __init__
- self.connect(**kwargs)
- ..\env\lib\site-packages\mysql\connector\abstracts.py:731: in connect
- self._open_connection()
- ..\env\lib\site-packages\mysql\connector\connection.py:245: in _open_connection
- self._socket.open_connection()
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
- def open_connection(self):
- """Open the TCP/IP connection to the MySQL server
- """
- # Get address information
- addrinfo = [None] * 5
- try:
- addrinfos = socket.getaddrinfo(self.server_host,
- self.server_port,
- 0, socket.SOCK_STREAM,
- socket.SOL_TCP)
- # If multiple results we favor IPv4, unless IPv6 was forced.
- for info in addrinfos:
- if self.force_ipv6 and info[0] == socket.AF_INET6:
- addrinfo = info
- break
- elif info[0] == socket.AF_INET:
- addrinfo = info
- break
- if self.force_ipv6 and addrinfo[0] is None:
- raise errors.InterfaceError(
- "No IPv6 address found for {0}".format(self.server_host))
- if addrinfo[0] is None:
- addrinfo = addrinfos[0]
- except IOError as err:
- raise errors.InterfaceError(
- errno=2003, values=(self.get_address(), _strioerror(err)))
- else:
- (self._family, socktype, proto, _, sockaddr) = addrinfo
- # Instanciate the socket and connect
- try:
- self.sock = socket.socket(self._family, socktype, proto)
- self.sock.settimeout(self._connection_timeout)
- self.sock.connect(sockaddr)
- except IOError as err:
- raise errors.InterfaceError(
- > errno=2003, values=(self.get_address(), _strioerror(err)))
- 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)
- ..\env\lib\site-packages\mysql\connector\network.py:528: InterfaceError
- E
- test_db_matches_ui1.py:3 (test_group_list)
- tp = <class 'AttributeError'>, value = None, tb = None
- def reraise(tp, value, tb=None):
- try:
- if value is None:
- value = tp()
- if value.__traceback__ is not tb:
- raise value.with_traceback(tb)
- > raise value
- ..\env\lib\site-packages\six.py:693:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ..\env\lib\site-packages\six.py:693: in reraise
- raise value
- ..\env\lib\site-packages\six.py:693: in reraise
- raise value
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- def fin():
- > fixture.session.ensure_logout()
- E AttributeError: 'NoneType' object has no attribute 'session'
- ..\conftest.py:48: AttributeError
- [100%]
- =================================== ERRORS ====================================
- ______________________ ERROR at setup of test_group_list ______________________
- self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
- def open_connection(self):
- """Open the TCP/IP connection to the MySQL server
- """
- # Get address information
- addrinfo = [None] * 5
- try:
- addrinfos = socket.getaddrinfo(self.server_host,
- self.server_port,
- 0, socket.SOCK_STREAM,
- socket.SOL_TCP)
- # If multiple results we favor IPv4, unless IPv6 was forced.
- for info in addrinfos:
- if self.force_ipv6 and info[0] == socket.AF_INET6:
- addrinfo = info
- break
- elif info[0] == socket.AF_INET:
- addrinfo = info
- break
- if self.force_ipv6 and addrinfo[0] is None:
- raise errors.InterfaceError(
- "No IPv6 address found for {0}".format(self.server_host))
- if addrinfo[0] is None:
- addrinfo = addrinfos[0]
- except IOError as err:
- raise errors.InterfaceError(
- errno=2003, values=(self.get_address(), _strioerror(err)))
- else:
- (self._family, socktype, proto, _, sockaddr) = addrinfo
- # Instanciate the socket and connect
- try:
- self.sock = socket.socket(self._family, socktype, proto)
- self.sock.settimeout(self._connection_timeout)
- > self.sock.connect(sockaddr)
- E ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
- ..\env\lib\site-packages\mysql\connector\network.py:525: ConnectionRefusedError
- During handling of the above exception, another exception occurred:
- request = <SubRequest 'db' for <Function 'test_group_list'>>
- @pytest.fixture(scope="session")
- def db(request):
- db_config = load_config(request.config.getoption("--target"))['db']
- > dbfixture = DbFixture(host = db_config['host'], database = db_config['database'], user = db_config['user'], password = db_config['password'])
- ..\conftest.py:38:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ..\fixture\db.py:13: in __init__
- self.connection = mysql.connector.connect(host=host, database = database, user = user, password = password)
- ..\env\lib\site-packages\mysql\connector\__init__.py:173: in connect
- return MySQLConnection(*args, **kwargs)
- ..\env\lib\site-packages\mysql\connector\connection.py:102: in __init__
- self.connect(**kwargs)
- ..\env\lib\site-packages\mysql\connector\abstracts.py:731: in connect
- self._open_connection()
- ..\env\lib\site-packages\mysql\connector\connection.py:245: in _open_connection
- self._socket.open_connection()
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <mysql.connector.network.MySQLTCPSocket object at 0x0000000004030DA0>
- def open_connection(self):
- """Open the TCP/IP connection to the MySQL server
- """
- # Get address information
- addrinfo = [None] * 5
- try:
- addrinfos = socket.getaddrinfo(self.server_host,
- self.server_port,
- 0, socket.SOCK_STREAM,
- socket.SOL_TCP)
- # If multiple results we favor IPv4, unless IPv6 was forced.
- for info in addrinfos:
- if self.force_ipv6 and info[0] == socket.AF_INET6:
- addrinfo = info
- break
- elif info[0] == socket.AF_INET:
- addrinfo = info
- break
- if self.force_ipv6 and addrinfo[0] is None:
- raise errors.InterfaceError(
- "No IPv6 address found for {0}".format(self.server_host))
- if addrinfo[0] is None:
- addrinfo = addrinfos[0]
- except IOError as err:
- raise errors.InterfaceError(
- errno=2003, values=(self.get_address(), _strioerror(err)))
- else:
- (self._family, socktype, proto, _, sockaddr) = addrinfo
- # Instanciate the socket and connect
- try:
- self.sock = socket.socket(self._family, socktype, proto)
- self.sock.settimeout(self._connection_timeout)
- self.sock.connect(sockaddr)
- except IOError as err:
- raise errors.InterfaceError(
- > errno=2003, values=(self.get_address(), _strioerror(err)))
- 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)
- ..\env\lib\site-packages\mysql\connector\network.py:528: InterfaceError
- ____________________ ERROR at teardown of test_group_list _____________________
- tp = <class 'AttributeError'>, value = None, tb = None
- def reraise(tp, value, tb=None):
- try:
- if value is None:
- value = tp()
- if value.__traceback__ is not tb:
- raise value.with_traceback(tb)
- > raise value
- ..\env\lib\site-packages\six.py:693:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ..\env\lib\site-packages\six.py:693: in reraise
- raise value
- ..\env\lib\site-packages\six.py:693: in reraise
- raise value
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- def fin():
- > fixture.session.ensure_logout()
- E AttributeError: 'NoneType' object has no attribute 'session'
- ..\conftest.py:48: AttributeError
- =========================== 2 error in 1.37 seconds ===========================
- Process finished with exit code 0
Add Comment
Please, Sign In to add comment