Advertisement
Guest User

Untitled

a guest
May 24th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.77 KB | None | 0 0
  1. [130] ~/devel/gitmate-2 master > export GITHUB_TEST_REPO=gitmate-test-user/test :(
  2. ~/devel/gitmate-2 master > export GITHUB_TEST_TOKEN=XXXXXXXXXXXXXXXXX
  3. ~/devel/gitmate-2 master > export GITHUB_WEBHOOK_SECRET=XXXXXXXXXXXXX
  4. ~/devel/gitmate-2 master > export DB_USER="XXXXXX"
  5. ~/devel/gitmate-2 master > export DB_NAME="XXXXXXX"
  6. ~/devel/gitmate-2 master > export DB_PASSWORD="XXXXXXXX"
  7. ~/devel/gitmate-2 master > export DEBUG=TRUE
  8. ~/devel/gitmate-2 master > py.test
  9. ========================================================================== test session starts ==========================================================================
  10. platform linux -- Python 3.6.1, pytest-3.1.0, py-1.4.32, pluggy-0.4.0
  11. Django settings: gitmate.settings (from ini file)
  12. rootdir: /home/fabian/devel/gitmate-2, inifile: pytest.ini
  13. plugins: django-3.1.2, cov-2.5.1
  14. collected 36 items
  15.  
  16. gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py FF
  17. gitmate_bug_spotter/tests/test_bug_spotter.py F
  18. gitmate_config/tests/management/test_commands.py ..
  19. gitmate_config/tests/models/test_plugin.py .....
  20. gitmate_config/tests/models/test_repository.py .......
  21. gitmate_config/tests/views/test_api.py .
  22. gitmate_config/tests/views/test_repositories.py ....
  23. gitmate_config/tests/views/test_settings.py .....
  24. gitmate_hooks/tests/test_receivers.py ....
  25. gitmate_hooks/tests/test_registrar.py F.
  26. gitmate_issue_labeller/tests/test_issue_labeller.py F
  27. gitmate_pr_size_labeller/tests/test_pr_size_labeller.py F
  28. gitmate_welcome_commenter/tests/test_welcome_commenter.py F
  29.  
  30. =============================================================================== FAILURES ================================================================================
  31. _________________________________________________ TestAutoLabelPendingOrWip.test_github_change_label_to_process_pending _________________________________________________
  32.  
  33. self = <test_auto_label_pending_or_wip.TestAutoLabelPendingOrWip testMethod=test_github_change_label_to_process_pending>
  34. mocked_labels = <PropertyMock name='labels' id='140178838481776'>
  35.  
  36. @patch.object(GitHubIssue, 'labels', new_callable=PropertyMock)
  37. def test_github_change_label_to_process_pending(self, mocked_labels):
  38. mocked_labels.return_value.add = MagicMock()
  39. response = self.simulate_github_webhook_call(
  40. 'pull_request', self.github_data)
  41. self.assertEquals(response.status_code, status.HTTP_200_OK)
  42. > mocked_labels().add.assert_called_with('process/pending_review')
  43.  
  44. gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py:28:
  45. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  46.  
  47. _mock_self = <MagicMock name='labels().add' id='140178835978000'>, args = ('process/pending_review',), kwargs = {}, expected = "add('process/pending_review')"
  48.  
  49. def assert_called_with(_mock_self, *args, **kwargs):
  50. """assert that the mock was called with the specified arguments.
  51.  
  52. Raises an AssertionError if the args and keyword args passed in are
  53. different to the last call to the mock."""
  54. self = _mock_self
  55. if self.call_args is None:
  56. expected = self._format_mock_call_signature(args, kwargs)
  57. > raise AssertionError('Expected call: %s\nNot called' % (expected,))
  58. E AssertionError: Expected call: add('process/pending_review')
  59. E Not called
  60.  
  61. /usr/lib64/python3.6/unittest/mock.py:805: AssertionError
  62. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  63. Operations to perform:
  64. Apply all migrations: gitmate_testplugin
  65. Running migrations:
  66. Applying gitmate_testplugin.0001_initial... OK
  67. Applying gitmate_testplugin.0002_auto_20170217_0738... OK
  68. Plugin updated successfully: "code_analysis"
  69. Plugin updated successfully: "welcome_commenter"
  70. Plugin updated successfully: "auto_label_pending_or_wip"
  71. Plugin updated successfully: "pr_size_labeller"
  72. Plugin updated successfully: "issue_labeller"
  73. Plugin updated successfully: "bug_spotter"
  74. Plugin updated successfully: "testplugin"
  75. ERROR: A responder failed.
  76. Responder: <@task: gitmate_auto_label_pending_or_wip.responders.mark_pending_review_or_wip_accordingly of gitmate:0x7f7df1e6db70>
  77. Args: (<IGitt.GitHub.GitHubMergeRequest.GitHubMergeRequest object at 0x7f7dede2fe80>,)
  78. Options: {'wip_label': 'process/WIP', 'pending_review_label': 'process/pending_review'}
  79. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  80. Traceback (most recent call last):
  81. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  82. return self.__value__
  83. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  84.  
  85. During handling of the above exception, another exception occurred:
  86.  
  87. Traceback (most recent call last):
  88. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  89. return fun(*args, **kwargs)
  90. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  91. channel = self.channel
  92. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  93. channel = self._channel = channel()
  94. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  95. value = self.__value__ = self.__contract__()
  96. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  97. channel = ChannelPromise(lambda: connection.default_channel)
  98. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  99. self.connection
  100. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  101. self._connection = self._establish_connection()
  102. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  103. conn = self.transport.establish_connection()
  104. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  105. conn = self.Connection(**opts)
  106. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  107. self.transport = self.Transport(host, connect_timeout, ssl)
  108. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  109. return create_transport(host, connect_timeout, ssl)
  110. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  111. return TCPTransport(host, connect_timeout)
  112. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  113. socket.SOCK_STREAM, SOL_TCP):
  114. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  115. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  116. socket.gaierror: [Errno -2] Name or service not known
  117.  
  118. During handling of the above exception, another exception occurred:
  119.  
  120. Traceback (most recent call last):
  121. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  122. retvals.append(responder.delay(*args, **options_specified))
  123. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  124. return self.apply_async(args, kwargs)
  125. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  126. **dict(self._get_exec_options(), **options)
  127. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  128. reply_to=reply_to or self.oid, **options
  129. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  130. **kwargs
  131. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  132. routing_key, mandatory, immediate, exchange, declare)
  133. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  134. interval_max)
  135. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  136. interval_start, interval_step, interval_max, callback)
  137. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  138. return fun(*args, **kwargs)
  139. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  140. return self.connection
  141. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  142. self._connection = self._establish_connection()
  143. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  144. conn = self.transport.establish_connection()
  145. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  146. conn = self.Connection(**opts)
  147. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  148. self.transport = self.Transport(host, connect_timeout, ssl)
  149. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  150. return create_transport(host, connect_timeout, ssl)
  151. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  152. return TCPTransport(host, connect_timeout)
  153. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  154. socket.SOCK_STREAM, SOL_TCP):
  155. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  156. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  157. socket.gaierror: [Errno -2] Name or service not known
  158. ___________________________________________________ TestAutoLabelPendingOrWip.test_github_change_label_to_process_wip ___________________________________________________
  159.  
  160. self = <test_auto_label_pending_or_wip.TestAutoLabelPendingOrWip testMethod=test_github_change_label_to_process_wip>
  161. mocked_labels = <PropertyMock name='labels' id='140178839995616'>, args = (<PropertyMock name='title' id='140178839995224'>,)
  162. response = <Response status_code=200, "text/html; charset=utf-8">
  163.  
  164. @patch.object(GitHubIssue, 'title',
  165. new_callable=PropertyMock,
  166. return_value='WIP: Fühl mich betrunken')
  167. @patch.object(GitHubIssue, 'labels', new_callable=PropertyMock)
  168. def test_github_change_label_to_process_wip(self, mocked_labels, *args):
  169. mocked_labels.return_value.add = MagicMock()
  170. response = self.simulate_github_webhook_call(
  171. 'pull_request', self.github_data)
  172. self.assertEquals(response.status_code, status.HTTP_200_OK)
  173. > mocked_labels().add.assert_called_with('process/WIP')
  174.  
  175. gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py:39:
  176. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  177.  
  178. _mock_self = <MagicMock name='labels().add' id='140178839995168'>, args = ('process/WIP',), kwargs = {}, expected = "add('process/WIP')"
  179.  
  180. def assert_called_with(_mock_self, *args, **kwargs):
  181. """assert that the mock was called with the specified arguments.
  182.  
  183. Raises an AssertionError if the args and keyword args passed in are
  184. different to the last call to the mock."""
  185. self = _mock_self
  186. if self.call_args is None:
  187. expected = self._format_mock_call_signature(args, kwargs)
  188. > raise AssertionError('Expected call: %s\nNot called' % (expected,))
  189. E AssertionError: Expected call: add('process/WIP')
  190. E Not called
  191.  
  192. /usr/lib64/python3.6/unittest/mock.py:805: AssertionError
  193. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  194. ERROR: A responder failed.
  195. Responder: <@task: gitmate_auto_label_pending_or_wip.responders.mark_pending_review_or_wip_accordingly of gitmate:0x7f7df1e6db70>
  196. Args: (<IGitt.GitHub.GitHubMergeRequest.GitHubMergeRequest object at 0x7f7df7340438>,)
  197. Options: {'wip_label': 'process/WIP', 'pending_review_label': 'process/pending_review'}
  198. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  199. Traceback (most recent call last):
  200. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  201. return self.__value__
  202. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  203.  
  204. During handling of the above exception, another exception occurred:
  205.  
  206. Traceback (most recent call last):
  207. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  208. return fun(*args, **kwargs)
  209. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  210. channel = self.channel
  211. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  212. channel = self._channel = channel()
  213. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  214. value = self.__value__ = self.__contract__()
  215. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  216. channel = ChannelPromise(lambda: connection.default_channel)
  217. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  218. self.connection
  219. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  220. self._connection = self._establish_connection()
  221. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  222. conn = self.transport.establish_connection()
  223. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  224. conn = self.Connection(**opts)
  225. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  226. self.transport = self.Transport(host, connect_timeout, ssl)
  227. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  228. return create_transport(host, connect_timeout, ssl)
  229. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  230. return TCPTransport(host, connect_timeout)
  231. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  232. socket.SOCK_STREAM, SOL_TCP):
  233. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  234. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  235. socket.gaierror: [Errno -2] Name or service not known
  236.  
  237. During handling of the above exception, another exception occurred:
  238.  
  239. Traceback (most recent call last):
  240. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  241. retvals.append(responder.delay(*args, **options_specified))
  242. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  243. return self.apply_async(args, kwargs)
  244. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  245. **dict(self._get_exec_options(), **options)
  246. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  247. reply_to=reply_to or self.oid, **options
  248. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  249. **kwargs
  250. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  251. routing_key, mandatory, immediate, exchange, declare)
  252. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  253. interval_max)
  254. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  255. interval_start, interval_step, interval_max, callback)
  256. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  257. return fun(*args, **kwargs)
  258. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  259. return self.connection
  260. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  261. self._connection = self._establish_connection()
  262. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  263. conn = self.transport.establish_connection()
  264. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  265. conn = self.Connection(**opts)
  266. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  267. self.transport = self.Transport(host, connect_timeout, ssl)
  268. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  269. return create_transport(host, connect_timeout, ssl)
  270. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  271. return TCPTransport(host, connect_timeout)
  272. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  273. socket.SOCK_STREAM, SOL_TCP):
  274. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  275. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  276. socket.gaierror: [Errno -2] Name or service not known
  277. ______________________________________________________________________ TestBugSpotter.test_github _______________________________________________________________________
  278.  
  279. self = <test_bug_spotter.TestBugSpotter testMethod=test_github>, m_aff_files = <PropertyMock name='affected_files' id='140178833667800'>
  280. m_clone = <function get_clone at 0x7f7dede4fae8>, m_labels = <PropertyMock name='labels' id='140178834810248'>
  281.  
  282. @patch.object(GitHubIssue, 'labels', new_callable=PropertyMock)
  283. @patch.object(GitHubRepository, 'get_clone', autospec=True)
  284. @patch.object(GitHubMergeRequest, 'affected_files',
  285. new_callable=PropertyMock)
  286. def test_github(self, m_aff_files, m_clone, m_labels):
  287. m_aff_files.return_value = {os.path.basename(f) for f in self.files}
  288. m_clone.return_value = (None, self.gitdir, )
  289. m_labels.return_value.add = MagicMock()
  290.  
  291. data = {
  292. 'repository': {'full_name': self.repo.full_name},
  293. 'pull_request': {'number': 7},
  294. 'action': 'synchronize'
  295. }
  296. response = self.simulate_github_webhook_call('pull_request', data)
  297.  
  298. > m_clone.assert_called()
  299.  
  300. gitmate_bug_spotter/tests/test_bug_spotter.py:89:
  301. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  302. /usr/lib64/python3.6/unittest/mock.py:197: in assert_called
  303. return mock.assert_called(*args, **kwargs)
  304. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  305.  
  306. _mock_self = <MagicMock name='get_clone' spec='function' id='140178833667296'>
  307.  
  308. def assert_called(_mock_self):
  309. """assert that the mock was called at least once
  310. """
  311. self = _mock_self
  312. if self.call_count == 0:
  313. msg = ("Expected '%s' to have been called." %
  314. self._mock_name or 'mock')
  315. > raise AssertionError(msg)
  316. E AssertionError: Expected 'get_clone' to have been called.
  317.  
  318. /usr/lib64/python3.6/unittest/mock.py:786: AssertionError
  319. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  320. ERROR: A responder failed.
  321. Responder: <@task: gitmate_bug_spotter.responders.label_hotspots of gitmate:0x7f7df1e6db70>
  322. Args: (<IGitt.GitHub.GitHubMergeRequest.GitHubMergeRequest object at 0x7f7deda778d0>,)
  323. Options: {'pattern': '(fix(e[sd])?|close[sd]?|resolve[sd]?) #[1-9][0-9]*', 'hotspot_label': 'review carefully!'}
  324. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  325. Traceback (most recent call last):
  326. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  327. return self.__value__
  328. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  329.  
  330. During handling of the above exception, another exception occurred:
  331.  
  332. Traceback (most recent call last):
  333. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  334. return fun(*args, **kwargs)
  335. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  336. channel = self.channel
  337. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  338. channel = self._channel = channel()
  339. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  340. value = self.__value__ = self.__contract__()
  341. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  342. channel = ChannelPromise(lambda: connection.default_channel)
  343. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  344. self.connection
  345. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  346. self._connection = self._establish_connection()
  347. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  348. conn = self.transport.establish_connection()
  349. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  350. conn = self.Connection(**opts)
  351. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  352. self.transport = self.Transport(host, connect_timeout, ssl)
  353. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  354. return create_transport(host, connect_timeout, ssl)
  355. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  356. return TCPTransport(host, connect_timeout)
  357. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  358. socket.SOCK_STREAM, SOL_TCP):
  359. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  360. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  361. socket.gaierror: [Errno -2] Name or service not known
  362.  
  363. During handling of the above exception, another exception occurred:
  364.  
  365. Traceback (most recent call last):
  366. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  367. retvals.append(responder.delay(*args, **options_specified))
  368. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  369. return self.apply_async(args, kwargs)
  370. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  371. **dict(self._get_exec_options(), **options)
  372. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  373. reply_to=reply_to or self.oid, **options
  374. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  375. **kwargs
  376. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  377. routing_key, mandatory, immediate, exchange, declare)
  378. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  379. interval_max)
  380. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  381. interval_start, interval_step, interval_max, callback)
  382. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  383. return fun(*args, **kwargs)
  384. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  385. return self.connection
  386. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  387. self._connection = self._establish_connection()
  388. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  389. conn = self.transport.establish_connection()
  390. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  391. conn = self.Connection(**opts)
  392. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  393. self.transport = self.Transport(host, connect_timeout, ssl)
  394. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  395. return create_transport(host, connect_timeout, ssl)
  396. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  397. return TCPTransport(host, connect_timeout)
  398. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  399. socket.SOCK_STREAM, SOL_TCP):
  400. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  401. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  402. socket.gaierror: [Errno -2] Name or service not known
  403. _______________________________________________________________ TestResponderRegistrar.test_active_plugin _______________________________________________________________
  404.  
  405. self = <test_registrar.TestResponderRegistrar testMethod=test_active_plugin>
  406.  
  407. def test_active_plugin(self):
  408. self.assertEqual(
  409. [result.get() for result in ResponderRegistrar.respond(
  410. MergeRequestActions.OPENED, self.repo, 'example',
  411. options={'test_var': True})],
  412. > [True]
  413. )
  414. E AssertionError: Lists differ: [] != [True]
  415. E
  416. E Second list contains 1 additional elements.
  417. E First extra element 0:
  418. E True
  419. E
  420. E - []
  421. E + [True]
  422.  
  423. gitmate_hooks/tests/test_registrar.py:22: AssertionError
  424. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  425. ERROR: A responder failed.
  426. Responder: <@task: test_registrar.test_responder of gitmate:0x7f7df1e6db70>
  427. Args: ('example',)
  428. Options: {'test_var': True}
  429. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  430. Traceback (most recent call last):
  431. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  432. return self.__value__
  433. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  434.  
  435. During handling of the above exception, another exception occurred:
  436.  
  437. Traceback (most recent call last):
  438. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  439. return fun(*args, **kwargs)
  440. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  441. channel = self.channel
  442. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  443. channel = self._channel = channel()
  444. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  445. value = self.__value__ = self.__contract__()
  446. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  447. channel = ChannelPromise(lambda: connection.default_channel)
  448. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  449. self.connection
  450. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  451. self._connection = self._establish_connection()
  452. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  453. conn = self.transport.establish_connection()
  454. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  455. conn = self.Connection(**opts)
  456. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  457. self.transport = self.Transport(host, connect_timeout, ssl)
  458. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  459. return create_transport(host, connect_timeout, ssl)
  460. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  461. return TCPTransport(host, connect_timeout)
  462. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  463. socket.SOCK_STREAM, SOL_TCP):
  464. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  465. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  466. socket.gaierror: [Errno -2] Name or service not known
  467.  
  468. During handling of the above exception, another exception occurred:
  469.  
  470. Traceback (most recent call last):
  471. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  472. retvals.append(responder.delay(*args, **options_specified))
  473. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  474. return self.apply_async(args, kwargs)
  475. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  476. **dict(self._get_exec_options(), **options)
  477. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  478. reply_to=reply_to or self.oid, **options
  479. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  480. **kwargs
  481. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  482. routing_key, mandatory, immediate, exchange, declare)
  483. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  484. interval_max)
  485. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  486. interval_start, interval_step, interval_max, callback)
  487. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  488. return fun(*args, **kwargs)
  489. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  490. return self.connection
  491. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  492. self._connection = self._establish_connection()
  493. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  494. conn = self.transport.establish_connection()
  495. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  496. conn = self.Connection(**opts)
  497. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  498. self.transport = self.Transport(host, connect_timeout, ssl)
  499. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  500. return create_transport(host, connect_timeout, ssl)
  501. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  502. return TCPTransport(host, connect_timeout)
  503. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  504. socket.SOCK_STREAM, SOL_TCP):
  505. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  506. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  507. socket.gaierror: [Errno -2] Name or service not known
  508. _____________________________________________________________________ TestIssueLabeller.test_github _____________________________________________________________________
  509.  
  510. self = <test_issue_labeller.TestIssueLabeller testMethod=test_github>, m_issue = <MagicMock name='__init__' id='140178833794944'>
  511. m_labels = <PropertyMock name='labels' id='140178976230536'>, m_avail_labels = <PropertyMock name='available_labels' id='140178976230816'>
  512. m_title = <PropertyMock name='title' id='140178976228632'>, m_desc = <PropertyMock name='description' id='140178833528088'>
  513.  
  514. @patch.object(GitHubIssue, 'description', new_callable=PropertyMock)
  515. @patch.object(GitHubIssue, 'title', new_callable=PropertyMock)
  516. @patch.object(GitHubIssue, 'available_labels', new_callable=PropertyMock)
  517. @patch.object(GitHubIssue, 'labels', new_callable=PropertyMock)
  518. @patch.object(GitHubIssue, '__init__', return_value=None)
  519. def test_github(self, m_issue, m_labels, m_avail_labels, m_title, m_desc):
  520. # clear all the labels
  521. m_labels.return_value = set()
  522.  
  523. # give some random labels
  524. m_avail_labels.return_value = ['apples', 'spaceships', 'bears']
  525.  
  526. # set some random summary
  527. m_title.return_value = 'Shape of you'
  528. m_desc.return_value = 'Make coala bears sing this song!'
  529.  
  530. data = {
  531. 'repository': {'full_name': environ['GITHUB_TEST_REPO']},
  532. 'issue': {'number': 0},
  533. 'action': 'opened'
  534. }
  535.  
  536. response = self.simulate_github_webhook_call('issues', data)
  537. self.assertEquals(response.status_code, status.HTTP_200_OK)
  538.  
  539. > m_labels.assert_called()
  540.  
  541. gitmate_issue_labeller/tests/test_issue_labeller.py:40:
  542. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  543.  
  544. _mock_self = <PropertyMock name='labels' id='140178976230536'>
  545.  
  546. def assert_called(_mock_self):
  547. """assert that the mock was called at least once
  548. """
  549. self = _mock_self
  550. if self.call_count == 0:
  551. msg = ("Expected '%s' to have been called." %
  552. self._mock_name or 'mock')
  553. > raise AssertionError(msg)
  554. E AssertionError: Expected 'labels' to have been called.
  555.  
  556. /usr/lib64/python3.6/unittest/mock.py:786: AssertionError
  557. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  558. ERROR: A responder failed.
  559. Responder: <@task: gitmate_issue_labeller.responders.add_labels_to_issue of gitmate:0x7f7df1e6db70>
  560. Args: (<IGitt.GitHub.GitHubIssue.GitHubIssue object at 0x7f7ded93d278>,)
  561. Options: {'blacklisted_labels': ['invalid', 'duplicate', 'bounty']}
  562. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  563. Traceback (most recent call last):
  564. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  565. return self.__value__
  566. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  567.  
  568. During handling of the above exception, another exception occurred:
  569.  
  570. Traceback (most recent call last):
  571. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  572. return fun(*args, **kwargs)
  573. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  574. channel = self.channel
  575. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  576. channel = self._channel = channel()
  577. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  578. value = self.__value__ = self.__contract__()
  579. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  580. channel = ChannelPromise(lambda: connection.default_channel)
  581. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  582. self.connection
  583. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  584. self._connection = self._establish_connection()
  585. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  586. conn = self.transport.establish_connection()
  587. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  588. conn = self.Connection(**opts)
  589. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  590. self.transport = self.Transport(host, connect_timeout, ssl)
  591. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  592. return create_transport(host, connect_timeout, ssl)
  593. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  594. return TCPTransport(host, connect_timeout)
  595. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  596. socket.SOCK_STREAM, SOL_TCP):
  597. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  598. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  599. socket.gaierror: [Errno -2] Name or service not known
  600.  
  601. During handling of the above exception, another exception occurred:
  602.  
  603. Traceback (most recent call last):
  604. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  605. retvals.append(responder.delay(*args, **options_specified))
  606. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  607. return self.apply_async(args, kwargs)
  608. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  609. **dict(self._get_exec_options(), **options)
  610. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  611. reply_to=reply_to or self.oid, **options
  612. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  613. **kwargs
  614. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  615. routing_key, mandatory, immediate, exchange, declare)
  616. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  617. interval_max)
  618. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  619. interval_start, interval_step, interval_max, callback)
  620. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  621. return fun(*args, **kwargs)
  622. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  623. return self.connection
  624. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  625. self._connection = self._establish_connection()
  626. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  627. conn = self.transport.establish_connection()
  628. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  629. conn = self.Connection(**opts)
  630. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  631. self.transport = self.Transport(host, connect_timeout, ssl)
  632. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  633. return create_transport(host, connect_timeout, ssl)
  634. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  635. return TCPTransport(host, connect_timeout)
  636. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  637. socket.SOCK_STREAM, SOL_TCP):
  638. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  639. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  640. socket.gaierror: [Errno -2] Name or service not known
  641. ____________________________________________________________________ TestPRSizeLabeller.test_github _____________________________________________________________________
  642.  
  643. self = <test_pr_size_labeller.TestPRSizeLabeller testMethod=test_github>, m_labels = <PropertyMock name='labels' id='140178834797792'>
  644. m_diffstat = <PropertyMock name='diffstat' id='140178834800480'>
  645.  
  646. @patch.object(GitHubMergeRequest, 'diffstat', new_callable=PropertyMock)
  647. @patch.object(GitHubIssue, 'labels', new_callable=PropertyMock)
  648. def test_github(self, m_labels, m_diffstat):
  649. for label, diffstat in self.test_labels.items():
  650. m_diffstat.return_value = diffstat
  651. response = self.simulate_github_webhook_call('pull_request',
  652. self.github_data)
  653. self.assertEquals(response.status_code, status.HTTP_200_OK)
  654.  
  655. # Check for label getter call
  656. > m_labels.assert_called()
  657.  
  658. gitmate_pr_size_labeller/tests/test_pr_size_labeller.py:39:
  659. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  660.  
  661. _mock_self = <PropertyMock name='labels' id='140178834797792'>
  662.  
  663. def assert_called(_mock_self):
  664. """assert that the mock was called at least once
  665. """
  666. self = _mock_self
  667. if self.call_count == 0:
  668. msg = ("Expected '%s' to have been called." %
  669. self._mock_name or 'mock')
  670. > raise AssertionError(msg)
  671. E AssertionError: Expected 'labels' to have been called.
  672.  
  673. /usr/lib64/python3.6/unittest/mock.py:786: AssertionError
  674. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  675. ERROR: A responder failed.
  676. Responder: <@task: gitmate_pr_size_labeller.responders.add_labels_based_on_size of gitmate:0x7f7df1e6db70>
  677. Args: (<IGitt.GitHub.GitHubMergeRequest.GitHubMergeRequest object at 0x7f7deda6d0f0>,)
  678. Options: {}
  679. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  680. Traceback (most recent call last):
  681. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  682. return self.__value__
  683. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  684.  
  685. During handling of the above exception, another exception occurred:
  686.  
  687. Traceback (most recent call last):
  688. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  689. return fun(*args, **kwargs)
  690. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  691. channel = self.channel
  692. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  693. channel = self._channel = channel()
  694. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  695. value = self.__value__ = self.__contract__()
  696. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  697. channel = ChannelPromise(lambda: connection.default_channel)
  698. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  699. self.connection
  700. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  701. self._connection = self._establish_connection()
  702. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  703. conn = self.transport.establish_connection()
  704. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  705. conn = self.Connection(**opts)
  706. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  707. self.transport = self.Transport(host, connect_timeout, ssl)
  708. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  709. return create_transport(host, connect_timeout, ssl)
  710. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  711. return TCPTransport(host, connect_timeout)
  712. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  713. socket.SOCK_STREAM, SOL_TCP):
  714. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  715. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  716. socket.gaierror: [Errno -2] Name or service not known
  717.  
  718. During handling of the above exception, another exception occurred:
  719.  
  720. Traceback (most recent call last):
  721. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  722. retvals.append(responder.delay(*args, **options_specified))
  723. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  724. return self.apply_async(args, kwargs)
  725. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  726. **dict(self._get_exec_options(), **options)
  727. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  728. reply_to=reply_to or self.oid, **options
  729. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  730. **kwargs
  731. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  732. routing_key, mandatory, immediate, exchange, declare)
  733. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  734. interval_max)
  735. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  736. interval_start, interval_step, interval_max, callback)
  737. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  738. return fun(*args, **kwargs)
  739. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  740. return self.connection
  741. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  742. self._connection = self._establish_connection()
  743. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  744. conn = self.transport.establish_connection()
  745. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  746. conn = self.Connection(**opts)
  747. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  748. self.transport = self.Transport(host, connect_timeout, ssl)
  749. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  750. return create_transport(host, connect_timeout, ssl)
  751. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  752. return TCPTransport(host, connect_timeout)
  753. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  754. socket.SOCK_STREAM, SOL_TCP):
  755. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  756. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  757. socket.gaierror: [Errno -2] Name or service not known
  758. ___________________________________________________________________ TestWelcomeCommenter.test_github ____________________________________________________________________
  759.  
  760. self = <test_welcome_commenter.TestWelcomeCommenter testMethod=test_github>, mock_add_comment = <function add_comment at 0x7f7dede4fbf8>
  761.  
  762. @patch('IGitt.GitHub.GitHubIssue.GitHubIssue.add_comment', autospec=True)
  763. def test_github(self, mock_add_comment):
  764. data = {
  765. 'repository': {'full_name': environ['GITHUB_TEST_REPO']},
  766. 'pull_request': {'number': 7},
  767. 'action': 'opened'
  768. }
  769. response = self.simulate_github_webhook_call('pull_request', data)
  770.  
  771. self.assertEquals(response.status_code, status.HTTP_200_OK)
  772. > mock_add_comment.assert_called_once()
  773.  
  774. gitmate_welcome_commenter/tests/test_welcome_commenter.py:24:
  775. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  776. /usr/lib64/python3.6/unittest/mock.py:201: in assert_called_once
  777. return mock.assert_called_once(*args, **kwargs)
  778. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  779.  
  780. _mock_self = <MagicMock name='add_comment' spec='function' id='140178836963904'>
  781.  
  782. def assert_called_once(_mock_self):
  783. """assert that the mock was called only once.
  784. """
  785. self = _mock_self
  786. if not self.call_count == 1:
  787. msg = ("Expected '%s' to have been called once. Called %s times." %
  788. (self._mock_name or 'mock', self.call_count))
  789. > raise AssertionError(msg)
  790. E AssertionError: Expected 'add_comment' to have been called once. Called 0 times.
  791.  
  792. /usr/lib64/python3.6/unittest/mock.py:795: AssertionError
  793. ------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
  794. ERROR: A responder failed.
  795. Responder: <@task: gitmate_welcome_commenter.responders.add_welcome_comment of gitmate:0x7f7df1e6db70>
  796. Args: (<IGitt.GitHub.GitHubMergeRequest.GitHubMergeRequest object at 0x7f7dedf42080>,)
  797. Options: {'autorespond_text': ''}
  798. ------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------
  799. Traceback (most recent call last):
  800. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 423, in __call__
  801. return self.__value__
  802. AttributeError: 'ChannelPromise' object has no attribute '__value__'
  803.  
  804. During handling of the above exception, another exception occurred:
  805.  
  806. Traceback (most recent call last):
  807. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 449, in _ensured
  808. return fun(*args, **kwargs)
  809. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 177, in _publish
  810. channel = self.channel
  811. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 194, in _get_channel
  812. channel = self._channel = channel()
  813. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 425, in __call__
  814. value = self.__value__ = self.__contract__()
  815. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 209, in <lambda>
  816. channel = ChannelPromise(lambda: connection.default_channel)
  817. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 771, in default_channel
  818. self.connection
  819. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  820. self._connection = self._establish_connection()
  821. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  822. conn = self.transport.establish_connection()
  823. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  824. conn = self.Connection(**opts)
  825. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  826. self.transport = self.Transport(host, connect_timeout, ssl)
  827. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  828. return create_transport(host, connect_timeout, ssl)
  829. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  830. return TCPTransport(host, connect_timeout)
  831. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  832. socket.SOCK_STREAM, SOL_TCP):
  833. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  834. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  835. socket.gaierror: [Errno -2] Name or service not known
  836.  
  837. During handling of the above exception, another exception occurred:
  838.  
  839. Traceback (most recent call last):
  840. File "/home/fabian/devel/gitmate-2/gitmate_hooks/__init__.py", line 101, in respond
  841. retvals.append(responder.delay(*args, **options_specified))
  842. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 461, in delay
  843. return self.apply_async(args, kwargs)
  844. File "/usr/lib/python3.6/site-packages/celery/app/task.py", line 573, in apply_async
  845. **dict(self._get_exec_options(), **options)
  846. File "/usr/lib/python3.6/site-packages/celery/app/base.py", line 354, in send_task
  847. reply_to=reply_to or self.oid, **options
  848. File "/usr/lib/python3.6/site-packages/celery/app/amqp.py", line 310, in publish_task
  849. **kwargs
  850. File "/usr/lib/python3.6/site-packages/kombu/messaging.py", line 172, in publish
  851. routing_key, mandatory, immediate, exchange, declare)
  852. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 470, in _ensured
  853. interval_max)
  854. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 382, in ensure_connection
  855. interval_start, interval_step, interval_max, callback)
  856. File "/usr/lib/python3.6/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
  857. return fun(*args, **kwargs)
  858. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 250, in connect
  859. return self.connection
  860. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 756, in connection
  861. self._connection = self._establish_connection()
  862. File "/usr/lib/python3.6/site-packages/kombu/connection.py", line 711, in _establish_connection
  863. conn = self.transport.establish_connection()
  864. File "/usr/lib/python3.6/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
  865. conn = self.Connection(**opts)
  866. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 165, in __init__
  867. self.transport = self.Transport(host, connect_timeout, ssl)
  868. File "/usr/lib/python3.6/site-packages/amqp/connection.py", line 186, in Transport
  869. return create_transport(host, connect_timeout, ssl)
  870. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 299, in create_transport
  871. return TCPTransport(host, connect_timeout)
  872. File "/usr/lib/python3.6/site-packages/amqp/transport.py", line 75, in __init__
  873. socket.SOCK_STREAM, SOL_TCP):
  874. File "/usr/lib64/python3.6/socket.py", line 743, in getaddrinfo
  875. for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  876. socket.gaierror: [Errno -2] Name or service not known
  877. =========================================================================== warnings summary ============================================================================
  878. gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py::TestAutoLabelPendingOrWip::test_github_change_label_to_process_pending
  879. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 41368), raddr=('192.30.253.117', 443)>
  880. response, code = func(*args, **kwargs)
  881. /home/fabian/devel/gitmate-2/gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py:27: DeprecationWarning: Please use assertEqual instead.
  882. self.assertEquals(response.status_code, status.HTTP_200_OK)
  883.  
  884. gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py::TestAutoLabelPendingOrWip::test_github_change_label_to_process_wip
  885. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 41370), raddr=('192.30.253.117', 443)>
  886. response, code = func(*args, **kwargs)
  887. /home/fabian/devel/gitmate-2/gitmate_auto_label_pending_or_wip/tests/test_auto_label_pending_or_wip.py:38: DeprecationWarning: Please use assertEqual instead.
  888. self.assertEquals(response.status_code, status.HTTP_200_OK)
  889.  
  890. gitmate_bug_spotter/tests/test_bug_spotter.py::TestBugSpotter::test_github
  891. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16820 is still running
  892. ResourceWarning, source=self)
  893. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16821 is still running
  894. ResourceWarning, source=self)
  895. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16822 is still running
  896. ResourceWarning, source=self)
  897. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16823 is still running
  898. ResourceWarning, source=self)
  899. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16824 is still running
  900. ResourceWarning, source=self)
  901. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16825 is still running
  902. ResourceWarning, source=self)
  903. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16826 is still running
  904. ResourceWarning, source=self)
  905. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16827 is still running
  906. ResourceWarning, source=self)
  907. /usr/lib64/python3.6/subprocess.py:761: ResourceWarning: subprocess 16828 is still running
  908. ResourceWarning, source=self)
  909. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 41372), raddr=('192.30.253.117', 443)>
  910. response, code = func(*args, **kwargs)
  911.  
  912. gitmate_config/tests/management/test_commands.py::TestCommands::test_upmate
  913. /home/fabian/devel/gitmate-2/gitmate_config/tests/management/test_commands.py:23: DeprecationWarning: Please use assertEqual instead.
  914. self.assertEquals(len(plugins), len(settings.GITMATE_PLUGINS))
  915.  
  916. gitmate_config/tests/views/test_repositories.py::TestRepositories::test_activate_repo
  917. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36368), raddr=('192.30.253.116', 443)>
  918. response, code = func(*args, **kwargs)
  919. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36370), raddr=('192.30.253.116', 443)>
  920. response, code = func(*args, **kwargs)
  921. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36372), raddr=('192.30.253.116', 443)>
  922. response, code = func(*args, **kwargs)
  923. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36374), raddr=('192.30.253.116', 443)>
  924. response, code = func(*args, **kwargs)
  925. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36376), raddr=('192.30.253.116', 443)>
  926. response, code = func(*args, **kwargs)
  927. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36378), raddr=('192.30.253.116', 443)>
  928. response, code = func(*args, **kwargs)
  929. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36380), raddr=('192.30.253.116', 443)>
  930. response, code = func(*args, **kwargs)
  931. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36382), raddr=('192.30.253.116', 443)>
  932. response, code = func(*args, **kwargs)
  933. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36384), raddr=('192.30.253.116', 443)>
  934. response, code = func(*args, **kwargs)
  935. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36386), raddr=('192.30.253.116', 443)>
  936. response, code = func(*args, **kwargs)
  937.  
  938. gitmate_config/tests/views/test_repositories.py::TestRepositories::test_get_repos
  939. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36388), raddr=('192.30.253.116', 443)>
  940. response, code = func(*args, **kwargs)
  941.  
  942. gitmate_config/tests/views/test_repositories.py::TestRepositories::test_igitt_repo_creation
  943. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36390), raddr=('192.30.253.116', 443)>
  944. response, code = func(*args, **kwargs)
  945.  
  946. gitmate_config/tests/views/test_settings.py::TestSettings::test_update_plugin_settings_authorized
  947. /home/fabian/devel/gitmate-2/gitmate_config/tests/views/test_settings.py:133: DeprecationWarning: Please use assertEqual instead.
  948. self.assertEquals(response.status_code, status.HTTP_200_OK)
  949.  
  950. gitmate_issue_labeller/tests/test_issue_labeller.py::TestIssueLabeller::test_github
  951. /home/fabian/devel/gitmate-2/gitmate_issue_labeller/tests/test_issue_labeller.py:38: DeprecationWarning: Please use assertEqual instead.
  952. self.assertEquals(response.status_code, status.HTTP_200_OK)
  953.  
  954. gitmate_pr_size_labeller/tests/test_pr_size_labeller.py::TestPRSizeLabeller::test_github
  955. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36392), raddr=('192.30.253.116', 443)>
  956. response, code = func(*args, **kwargs)
  957. /home/fabian/devel/gitmate-2/gitmate_pr_size_labeller/tests/test_pr_size_labeller.py:36: DeprecationWarning: Please use assertEqual instead.
  958. self.assertEquals(response.status_code, status.HTTP_200_OK)
  959.  
  960. gitmate_welcome_commenter/tests/test_welcome_commenter.py::TestWelcomeCommenter::test_github
  961. /usr/lib/python3.6/site-packages/IGitt/GitHub/__init__.py:26: ResourceWarning: unclosed <ssl.SSLSocket fd=22, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.103', 36394), raddr=('192.30.253.116', 443)>
  962. response, code = func(*args, **kwargs)
  963. /home/fabian/devel/gitmate-2/gitmate_welcome_commenter/tests/test_welcome_commenter.py:23: DeprecationWarning: Please use assertEqual instead.
  964. self.assertEquals(response.status_code, status.HTTP_200_OK)
  965.  
  966. -- Docs: http://doc.pytest.org/en/latest/warnings.html
  967. =========================================================== 7 failed, 29 passed, 33 warnings in 48.49 seconds ===========================================================
  968. sys:1: ResourceWarning: unclosed file <_io.BufferedReader name=39>
  969. sys:1: ResourceWarning: unclosed file <_io.BufferedWriter name=35>
  970. sys:1: ResourceWarning: unclosed file <_io.BufferedReader name=37>
  971. [1] ~/devel/gitmate-2 master >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement