· 8 years ago · Mar 21, 2018, 09:18 AM
1coverage-dj111-authentic recreate: /tmp/tox-cazino/hobo/coverage-dj111-authentic
2coverage-dj111-authentic installdeps: django>=1.11,<1.12, pytest>=3.3.0,<3.4, pytest-cov, pytest-django, pytest-mock, coverage, raven, cssselect, WebTest, django-mellon, celery<4, http://git.entrouvert.org/authentic.git/snapshot/authentic-master.tar.gz, git+http://git.entrouvert.org/debian/django-tenant-schemas.git@wip/github-remerge-2017, httmock
3coverage-dj111-authentic develop-inst: /home/cazino/src/hobo
4coverage-dj111-authentic installed: amqp==1.4.9,anyjson==0.3.3,asn1crypto==0.24.0,attrs==17.4.0,authentic2==0.0.0,beautifulsoup4==4.6.0,billiard==3.3.0.23,celery==3.1.25,certifi==2018.1.18,cffi==1.11.5,chardet==3.0.4,contextlib2==0.5.5,coverage==4.5.1,cryptography==2.2.1,cssselect==1.0.3,diff-match-patch==20121119,Django==1.11.11,django-admin-tools==0.6.0,django-appconf==1.0.2,django-filter==1.1.0,django-import-export==1.0.0,django-jsonfield==1.0.1,django-mellon==1.2.34,django-model-utils==3.1.1,Django-Select2==5.11.1,django-tables2==1.0.7,django-tenant-schemas==1.5.2.1.259+gd05d660,djangorestframework==3.3.3,dnspython==1.15.0,enum34==1.1.6,et-xmlfile==1.0.1,funcsigs==1.0.2,gadjo==0.47,-e git+ssh://git@git.entrouvert.org/hobo.git@96208f6b0608ebacb2eff3ab004db3791de5b4fc#egg=hobo,httmock==1.2.6,idna==2.6,ipaddress==1.0.19,isodate==0.6.0,jdcal==1.3,jwcrypto==0.4.2,kombu==3.0.37,ldaptools==0.14,Markdown==2.6.11,mock==2.0.0,odfpy==1.3.6,openpyxl==2.5.1,pbr==3.1.1,pluggy==0.6.0,prometheus-client==0.1.1,psycopg2==2.7.4,py==1.5.2,pyasn1==0.4.2,pyasn1-modules==0.2.1,pycparser==2.18,pycrypto==2.6.1,pytest==3.3.2,pytest-cov==2.5.1,pytest-django==3.1.2,pytest-mock==1.7.1,python-ldap==3.0.0,pytz==2018.3,PyYAML==3.12,raven==6.6.0,requests==2.18.4,six==1.11.0,tablib==0.12.1,unicodecsv==0.14.1,urllib3==1.22,waitress==1.1.0,WebOb==1.7.4,WebTest==2.0.29,xlrd==1.1.0,xlwt==1.3.0,XStatic==1.0.1,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.10.2.1,XStatic-jquery-ui==1.11.0.1,XStatic-OpenSans==1.0.0,XStatic-Select2==4.0.3.1
5coverage-dj111-authentic runtests: PYTHONHASHSEED='974708195'
6coverage-dj111-authentic runtests: commands[0] | ./getlasso.sh
7'/tmp/tox-cazino/hobo/coverage-dj111-authentic/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python2.7/dist-packages/lasso.py'
8'/tmp/tox-cazino/hobo/coverage-dj111-authentic/lib/python2.7/site-packages/_lasso.x86_64-linux-gnu.so' -> '/usr/lib/python2.7/dist-packages/_lasso.x86_64-linux-gnu.so'
9coverage-dj111-authentic runtests: commands[1] | py.test --junitxml=junit-coverage-dj111-authentic.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_authentic/
10Traceback (most recent call last):
11 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/bin/py.test", line 11, in <module>
12 sys.exit(main())
13 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/config.py", line 50, in main
14 config = _prepareconfig(args, plugins)
15 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/config.py", line 160, in _prepareconfig
16 pluginmanager=pluginmanager, args=args)
17 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 617, in __call__
18 return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
19 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 222, in _hookexec
20 return self._inner_hookexec(hook, methods, kwargs)
21 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 216, in <lambda>
22 firstresult=hook.spec_opts.get('firstresult'),
23 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 196, in _multicall
24 gen.send(outcome)
25 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
26 config = outcome.get_result()
27 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
28 _reraise(*ex) # noqa
29 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
30 res = hook_impl.function(*args)
31 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/config.py", line 943, in pytest_cmdline_parse
32 self.parse(args)
33 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/config.py", line 1108, in parse
34 self._preparse(args, addopts=addopts)
35 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/_pytest/config.py", line 1079, in _preparse
36 args=args, parser=self._parser)
37 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 617, in __call__
38 return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
39 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 222, in _hookexec
40 return self._inner_hookexec(hook, methods, kwargs)
41 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/__init__.py", line 216, in <lambda>
42 firstresult=hook.spec_opts.get('firstresult'),
43 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 201, in _multicall
44 return outcome.get_result()
45 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
46 _reraise(*ex) # noqa
47 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
48 res = hook_impl.function(*args)
49 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pytest_django/plugin.py", line 244, in pytest_load_initial_conftests
50 dj_settings.DATABASES
51 File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
52 self.gen.throw(type, value, traceback)
53 File "/tmp/tox-cazino/hobo/coverage-dj111-authentic/local/lib/python2.7/site-packages/pytest_django/plugin.py", line 117, in _handle_import_error
54 raise ImportError(msg)
55ImportError: cannot import name patterns
56
57pytest-django found a Django project in /home/cazino/src/hobo (it contains manage.py) and added it to the Python path.
58If this is wrong, add "django_find_project = false" to pytest.ini and explicitly manage your Python path.
59ERROR: InvocationError: '/tmp/tox-cazino/hobo/coverage-dj111-authentic/bin/py.test --junitxml=junit-coverage-dj111-authentic.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_authentic/'
60coverage-dj111-hobo recreate: /tmp/tox-cazino/hobo/coverage-dj111-hobo
61coverage-dj111-hobo installdeps: django>=1.11,<1.12, pytest>=3.3.0,<3.4, pytest-cov, pytest-django, pytest-mock, coverage, raven, cssselect, WebTest, django-mellon, celery<4, git+http://git.entrouvert.org/debian/django-tenant-schemas.git@wip/github-remerge-2017, httmock
62coverage-dj111-hobo develop-inst: /home/cazino/src/hobo
63coverage-dj111-hobo installed: amqp==1.4.9,anyjson==0.3.3,attrs==17.4.0,beautifulsoup4==4.6.0,billiard==3.3.0.23,celery==3.1.25,certifi==2018.1.18,chardet==3.0.4,contextlib2==0.5.5,coverage==4.5.1,cssselect==1.0.3,Django==1.11.11,django-mellon==1.2.34,django-tenant-schemas==1.5.2.1.259+gd05d660,funcsigs==1.0.2,gadjo==0.47,-e git+ssh://git@git.entrouvert.org/hobo.git@96208f6b0608ebacb2eff3ab004db3791de5b4fc#egg=hobo,httmock==1.2.6,idna==2.6,isodate==0.6.0,kombu==3.0.37,mock==2.0.0,pbr==3.1.1,pluggy==0.6.0,prometheus-client==0.1.1,psycopg2==2.7.4,py==1.5.2,pytest==3.3.2,pytest-cov==2.5.1,pytest-django==3.1.2,pytest-mock==1.7.1,pytz==2018.3,raven==6.6.0,requests==2.18.4,six==1.11.0,urllib3==1.22,waitress==1.1.0,WebOb==1.7.4,WebTest==2.0.29,XStatic==1.0.1,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.10.2.1,XStatic-jquery-ui==1.12.0.1,XStatic-OpenSans==1.0.0
64coverage-dj111-hobo runtests: PYTHONHASHSEED='974708195'
65coverage-dj111-hobo runtests: commands[0] | ./getlasso.sh
66'/tmp/tox-cazino/hobo/coverage-dj111-hobo/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python2.7/dist-packages/lasso.py'
67'/tmp/tox-cazino/hobo/coverage-dj111-hobo/lib/python2.7/site-packages/_lasso.x86_64-linux-gnu.so' -> '/usr/lib/python2.7/dist-packages/_lasso.x86_64-linux-gnu.so'
68coverage-dj111-hobo runtests: commands[1] | py.test --junitxml=junit-coverage-dj111-hobo.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests/
69============================= test session starts ==============================
70platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
71Django settings: hobo.settings (from environment variable)
72rootdir: /home/cazino/src/hobo, inifile:
73plugins: mock-1.7.1, django-3.1.2, cov-2.5.1
74collected 12 items
75
76tests/test_context_processors.py F [ 8%]
77tests/test_environment.py .. [ 25%]
78tests/test_hobo_json.py .... [ 58%]
79tests/test_manager.py FFF [ 83%]
80tests/test_signature.py . [ 91%]
81tests/test_version.py . [100%]
82
83--- generated xml file: /home/cazino/src/hobo/junit-coverage-dj111-hobo.xml ----
84
85---------- coverage: platform linux2, python 2.7.14-final-0 ----------
86Coverage XML written to file coverage.xml
87
88=================================== FAILURES ===================================
89_______________________________ test_theme_base ________________________________
90
91settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fdd5d73a790>
92rf = <django.test.client.RequestFactory object at 0x7fdd5d73a890>
93
94 def test_theme_base(settings, rf):
95 settings.THEME_SKELETON_URL = 'http://combo.example.com/_skeleton_/'
96 seen_urls = []
97 TEMPLATE = 'Feeling lucky, punk?'
98 TEMPLATE_PAGE2 = 'Response for page 2'
99
100 @urlmatch(netloc=r'combo.example.com$')
101 def combo_mock(url, request):
102 seen_urls.append(url.geturl())
103 status_code = 200
104 content = TEMPLATE
105 if 'page2' in url.query:
106 content = TEMPLATE_PAGE2
107 elif 'page1' in url.query:
108 status_code = 500
109 content = 'No template sorry'
110 return {
111 'status_code': status_code,
112 'content': content,
113 'headers': {'X-Combo-Skeleton-Pages': json.dumps(
114 {'1': 'http://testserver/foo',
115 '2': 'http://testserver/page1/page2/'})},
116 }
117
118 cache.clear()
119 with HTTMock(combo_mock):
120 context = theme_base(rf.get('/'))
121> assert context['theme_base']().origin.source == TEMPLATE
122E AttributeError: 'Origin' object has no attribute 'source'
123
124tests/test_context_processors.py:37: AttributeError
125_____________________________ test_unlogged_access _____________________________
126
127 def test_unlogged_access():
128 # connect while not being logged in
129 app = TestApp(application)
130> assert app.get('/', status=302).location == 'http://localhost:80/login/?next=/'
131
132tests/test_manager.py:34:
133_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
134/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:331: in get
135 expect_errors=expect_errors)
136/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:651: in do_request
137 self._check_status(status, res)
138_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
139
140self = <webtest.app.TestApp object at 0x7fdd57bac890>, status = 302
141res = <400 Bad Request text/html body='<h1>Bad R.../h1>'/26>
142
143 def _check_status(self, status, res):
144 if status == '*':
145 return
146 res_status = res.status
147 if (isinstance(status, string_types) and '*' in status):
148 if re.match(fnmatch.translate(status), res_status, re.I):
149 return
150 if isinstance(status, string_types):
151 if status == res_status:
152 return
153 if isinstance(status, (list, tuple)):
154 if res.status_int not in status:
155 raise AppError(
156 "Bad response: %s (not one of %s for %s)\n%s",
157 res_status, ', '.join(map(str, status)),
158 res.request.url, res)
159 return
160 if status is None:
161 if res.status_int >= 200 and res.status_int < 400:
162 return
163 raise AppError(
164 "Bad response: %s (not 200 OK or 3xx redirect for %s)\n%s",
165 res_status, res.request.url,
166 res)
167 if status != res.status_int:
168 raise AppError(
169> "Bad response: %s (not %s)\n%s", res_status, status, res)
170E AppError: Bad response: 400 Bad Request (not 302)
171E '<h1>Bad Request (400)</h1>'
172
173/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:686: AppError
174----------------------------- Captured stderr call -----------------------------
175exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
176------------------------------ Captured log call -------------------------------
177exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
178_________________________________ test_access __________________________________
179
180admin_user = <User: admin>
181
182 def test_access(admin_user):
183> app = login(TestApp(application))
184
185tests/test_manager.py:37:
186_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
187tests/test_manager.py:23: in login
188 login_page = app.get('/login/')
189/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:331: in get
190 expect_errors=expect_errors)
191/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:651: in do_request
192 self._check_status(status, res)
193_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
194
195self = <webtest.app.TestApp object at 0x7fdd57318990>, status = None
196res = <400 Bad Request text/html body='<h1>Bad R.../h1>'/26>
197
198 def _check_status(self, status, res):
199 if status == '*':
200 return
201 res_status = res.status
202 if (isinstance(status, string_types) and '*' in status):
203 if re.match(fnmatch.translate(status), res_status, re.I):
204 return
205 if isinstance(status, string_types):
206 if status == res_status:
207 return
208 if isinstance(status, (list, tuple)):
209 if res.status_int not in status:
210 raise AppError(
211 "Bad response: %s (not one of %s for %s)\n%s",
212 res_status, ', '.join(map(str, status)),
213 res.request.url, res)
214 return
215 if status is None:
216 if res.status_int >= 200 and res.status_int < 400:
217 return
218 raise AppError(
219 "Bad response: %s (not 200 OK or 3xx redirect for %s)\n%s",
220 res_status, res.request.url,
221> res)
222E AppError: Bad response: 400 Bad Request (not 200 OK or 3xx redirect for http://localhost/login/)
223E '<h1>Bad Request (400)</h1>'
224
225/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:683: AppError
226----------------------------- Captured stderr call -----------------------------
227exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
228------------------------------ Captured log call -------------------------------
229exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
230_________________________________ test_logout __________________________________
231
232admin_user = <User: admin>
233
234 def test_logout(admin_user):
235> app = login(TestApp(application))
236
237tests/test_manager.py:44:
238_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
239tests/test_manager.py:23: in login
240 login_page = app.get('/login/')
241/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:331: in get
242 expect_errors=expect_errors)
243/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:651: in do_request
244 self._check_status(status, res)
245_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
246
247self = <webtest.app.TestApp object at 0x7fdd572bd990>, status = None
248res = <400 Bad Request text/html body='<h1>Bad R.../h1>'/26>
249
250 def _check_status(self, status, res):
251 if status == '*':
252 return
253 res_status = res.status
254 if (isinstance(status, string_types) and '*' in status):
255 if re.match(fnmatch.translate(status), res_status, re.I):
256 return
257 if isinstance(status, string_types):
258 if status == res_status:
259 return
260 if isinstance(status, (list, tuple)):
261 if res.status_int not in status:
262 raise AppError(
263 "Bad response: %s (not one of %s for %s)\n%s",
264 res_status, ', '.join(map(str, status)),
265 res.request.url, res)
266 return
267 if status is None:
268 if res.status_int >= 200 and res.status_int < 400:
269 return
270 raise AppError(
271 "Bad response: %s (not 200 OK or 3xx redirect for %s)\n%s",
272 res_status, res.request.url,
273> res)
274E AppError: Bad response: 400 Bad Request (not 200 OK or 3xx redirect for http://localhost/login/)
275E '<h1>Bad Request (400)</h1>'
276
277/tmp/tox-cazino/hobo/coverage-dj111-hobo/local/lib/python2.7/site-packages/webtest/app.py:683: AppError
278----------------------------- Captured stderr call -----------------------------
279exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
280------------------------------ Captured log call -------------------------------
281exception.py 80 ERROR Invalid HTTP_HOST header: 'localhost:80'. You may need to add u'localhost' to ALLOWED_HOSTS.
282=============================== warnings summary ===============================
283tests/test_manager.py::TestApp
284 cannot collect test class 'TestApp' because it has a __init__ constructor
285
286tests/test_version.py::TestApp
287 cannot collect test class 'TestApp' because it has a __init__ constructor
288
289-- Docs: http://doc.pytest.org/en/latest/warnings.html
290================ 4 failed, 8 passed, 2 warnings in 1.91 seconds ================
291ERROR: InvocationError: '/tmp/tox-cazino/hobo/coverage-dj111-hobo/bin/py.test --junitxml=junit-coverage-dj111-hobo.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests/'
292coverage-dj111-multipublik recreate: /tmp/tox-cazino/hobo/coverage-dj111-multipublik
293coverage-dj111-multipublik installdeps: django>=1.11,<1.12, pytest>=3.3.0,<3.4, pytest-cov, pytest-django, pytest-mock, coverage, raven, cssselect, WebTest, django-mellon, celery<4, git+http://git.entrouvert.org/debian/django-tenant-schemas.git@wip/github-remerge-2017, httmock
294coverage-dj111-multipublik develop-inst: /home/cazino/src/hobo
295coverage-dj111-multipublik installed: amqp==1.4.9,anyjson==0.3.3,attrs==17.4.0,beautifulsoup4==4.6.0,billiard==3.3.0.23,celery==3.1.25,certifi==2018.1.18,chardet==3.0.4,contextlib2==0.5.5,coverage==4.5.1,cssselect==1.0.3,Django==1.11.11,django-mellon==1.2.34,django-tenant-schemas==1.5.2.1.259+gd05d660,funcsigs==1.0.2,gadjo==0.47,-e git+ssh://git@git.entrouvert.org/hobo.git@96208f6b0608ebacb2eff3ab004db3791de5b4fc#egg=hobo,httmock==1.2.6,idna==2.6,isodate==0.6.0,kombu==3.0.37,mock==2.0.0,pbr==3.1.1,pluggy==0.6.0,prometheus-client==0.1.1,psycopg2==2.7.4,py==1.5.2,pytest==3.3.2,pytest-cov==2.5.1,pytest-django==3.1.2,pytest-mock==1.7.1,pytz==2018.3,raven==6.6.0,requests==2.18.4,six==1.11.0,urllib3==1.22,waitress==1.1.0,WebOb==1.7.4,WebTest==2.0.29,XStatic==1.0.1,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.10.2.1,XStatic-jquery-ui==1.12.0.1,XStatic-OpenSans==1.0.0
296coverage-dj111-multipublik runtests: PYTHONHASHSEED='974708195'
297coverage-dj111-multipublik runtests: commands[0] | ./getlasso.sh
298'/tmp/tox-cazino/hobo/coverage-dj111-multipublik/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python2.7/dist-packages/lasso.py'
299'/tmp/tox-cazino/hobo/coverage-dj111-multipublik/lib/python2.7/site-packages/_lasso.x86_64-linux-gnu.so' -> '/usr/lib/python2.7/dist-packages/_lasso.x86_64-linux-gnu.so'
300coverage-dj111-multipublik runtests: commands[1] | py.test --junitxml=junit-coverage-dj111-multipublik.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_multipublik/
301============================= test session starts ==============================
302platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
303Django settings: settings (from environment variable)
304rootdir: /home/cazino/src/hobo, inifile:
305plugins: mock-1.7.1, django-3.1.2, cov-2.5.1
306collected 1 item
307
308tests_multipublik/test_multipublik.py . [100%]
309
310 generated xml file: /home/cazino/src/hobo/junit-coverage-dj111-multipublik.xml
311
312---------- coverage: platform linux2, python 2.7.14-final-0 ----------
313Coverage XML written to file coverage.xml
314
315=========================== 1 passed in 8.67 seconds ===========================
316coverage-dj111-multipublik runtests: commands[2] | mv coverage.xml coverage-coverage-dj111-multipublik.xml
317coverage-dj111-multitenant recreate: /tmp/tox-cazino/hobo/coverage-dj111-multitenant
318coverage-dj111-multitenant installdeps: django>=1.11,<1.12, pytest>=3.3.0,<3.4, pytest-cov, pytest-django, pytest-mock, coverage, raven, cssselect, WebTest, django-mellon, celery<4, git+http://git.entrouvert.org/debian/django-tenant-schemas.git@wip/github-remerge-2017, httmock
319coverage-dj111-multitenant develop-inst: /home/cazino/src/hobo
320coverage-dj111-multitenant installed: amqp==1.4.9,anyjson==0.3.3,attrs==17.4.0,beautifulsoup4==4.6.0,billiard==3.3.0.23,celery==3.1.25,certifi==2018.1.18,chardet==3.0.4,contextlib2==0.5.5,coverage==4.5.1,cssselect==1.0.3,Django==1.11.11,django-mellon==1.2.34,django-tenant-schemas==1.5.2.1.259+gd05d660,funcsigs==1.0.2,gadjo==0.47,-e git+ssh://git@git.entrouvert.org/hobo.git@96208f6b0608ebacb2eff3ab004db3791de5b4fc#egg=hobo,httmock==1.2.6,idna==2.6,isodate==0.6.0,kombu==3.0.37,mock==2.0.0,pbr==3.1.1,pluggy==0.6.0,prometheus-client==0.1.1,psycopg2==2.7.4,py==1.5.2,pytest==3.3.2,pytest-cov==2.5.1,pytest-django==3.1.2,pytest-mock==1.7.1,pytz==2018.3,raven==6.6.0,requests==2.18.4,six==1.11.0,urllib3==1.22,waitress==1.1.0,WebOb==1.7.4,WebTest==2.0.29,XStatic==1.0.1,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.10.2.1,XStatic-jquery-ui==1.12.0.1,XStatic-OpenSans==1.0.0
321coverage-dj111-multitenant runtests: PYTHONHASHSEED='974708195'
322coverage-dj111-multitenant runtests: commands[0] | ./getlasso.sh
323'/tmp/tox-cazino/hobo/coverage-dj111-multitenant/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python2.7/dist-packages/lasso.py'
324'/tmp/tox-cazino/hobo/coverage-dj111-multitenant/lib/python2.7/site-packages/_lasso.x86_64-linux-gnu.so' -> '/usr/lib/python2.7/dist-packages/_lasso.x86_64-linux-gnu.so'
325coverage-dj111-multitenant runtests: commands[1] | py.test --junitxml=junit-coverage-dj111-multitenant.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_multitenant/
326============================= test session starts ==============================
327platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
328Django settings: settings (from environment variable)
329rootdir: /home/cazino/src/hobo, inifile:
330plugins: mock-1.7.1, django-3.1.2, cov-2.5.1
331collected 18 items
332
333tests_multitenant/test_hobo_notify.py .. [ 11%]
334tests_multitenant/test_middleware.py . [ 16%]
335tests_multitenant/test_objects.py . [ 22%]
336tests_multitenant/test_request_context_filter.py F [ 27%]
337tests_multitenant/test_settings.py F........ [ 77%]
338tests_multitenant/test_tenant_command.py ... [ 94%]
339tests_multitenant/test_xforwardedfor.py F [100%]
340
341 generated xml file: /home/cazino/src/hobo/junit-coverage-dj111-multitenant.xml
342
343---------- coverage: platform linux2, python 2.7.14-final-0 ----------
344Coverage XML written to file coverage.xml
345
346=================================== FAILURES ===================================
347_________________________ test_request_context_filter __________________________
348
349caplog = <_pytest.logging.LogCaptureFixture object at 0x7fb103137bd0>
350settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fb103137c90>
351tenants = [<Tenant: tenant1_example_net>, <Tenant: tenant2_example_net>]
352client = <django.test.client.Client object at 0x7fb102dec210>
353
354 def test_request_context_filter(caplog, settings, tenants, client):
355 root_logger = logging.getLogger()
356 assert len(root_logger.handlers) == 2
357 root_logger.handlers[0].addFilter(RequestContextFilter())
358 for tenant in tenants:
359 with tenant_context(tenant):
360 user = User.objects.create(first_name='John', last_name='Doe', username='john.doe',
361 email='jodn.doe@example.com')
362 user.set_password('john.doe')
363 user.save()
364 user.saml_identifiers.create(name_id='ab' * 16, issuer='https://idp.example.com')
365
366 for tenant in tenants:
367 with tenant_context(tenant):
368 client.login(username='john.doe', password='john.doe')
369 client.get('/', SERVER_NAME=tenant.domain_url,
370 HTTP_X_FORWARDED_FOR='99.99.99.99, 127.0.0.1')
371 records = [record for record in caplog.records if record.levelno >= logging.INFO]
372 assert len(records) == 2
373 for tenant, record in zip(tenants, records):
374 assert record.ip == '99.99.99.99'
375> assert record.tenant == tenant.domain_url
376E AssertionError: assert '-' == 'tenant1.example.net'
377E - -
378E + tenant1.example.net
379
380tests_multitenant/test_request_context_filter.py:29: AssertionError
381---------------------------- Captured stdout setup -----------------------------
382=== Running migrate for schema tenant1_example_net
383Operations to perform:
384 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
385Running migrations:
386 Applying contenttypes.0001_initial... OK
387 Applying contenttypes.0002_remove_content_type_name... OK
388 Applying auth.0001_initial... OK
389 Applying auth.0002_alter_permission_name_max_length... OK
390 Applying auth.0003_alter_user_email_max_length... OK
391 Applying auth.0004_alter_user_username_opts... OK
392 Applying auth.0005_alter_user_last_login_null... OK
393 Applying auth.0006_require_contenttypes_0002... OK
394 Applying auth.0007_alter_validators_add_error_messages... OK
395 Applying auth.0008_alter_user_username_max_length... OK
396 Applying common.0001_initial... OK
397 Applying common.0002_auto_20160105_1702... OK
398 Applying environment.0001_initial... OK
399 Applying environment.0002_authentic_use_as_idp_for_self... OK
400 Applying environment.0003_auto_20150309_0811... OK
401 Applying environment.0004_fargo... OK
402 Applying environment.0005_variable_label... OK
403 Applying environment.0006_auto_20150708_0830... OK
404 Applying environment.0007_auto_20151008_1406... OK
405 Applying environment.0008_auto_20151021_1414... OK
406 Applying environment.0009_mandayejs... OK
407 Applying environment.0010_variable_auto... OK
408 Applying environment.0011_chrono... OK
409 Applying environment.0012_mandayejs_site_app... OK
410 Applying environment.0013_auto_20160226_1633... OK
411 Applying environment.0014_piwik... OK
412 Applying environment.0015_corbo... OK
413 Applying environment.0016_bijoe... OK
414 Applying environment.0017_hobo... OK
415 Applying environment.0018_auto_20161102_1929... OK
416 Applying mellon.0001_initial... OK
417 Applying profile.0001_initial... OK
418 Applying profile.0002_add_data... OK
419 Applying sessions.0001_initial... OK
420=== Running migrate for schema tenant2_example_net
421Operations to perform:
422 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
423Running migrations:
424 Applying contenttypes.0001_initial... OK
425 Applying contenttypes.0002_remove_content_type_name... OK
426 Applying auth.0001_initial... OK
427 Applying auth.0002_alter_permission_name_max_length... OK
428 Applying auth.0003_alter_user_email_max_length... OK
429 Applying auth.0004_alter_user_username_opts... OK
430 Applying auth.0005_alter_user_last_login_null... OK
431 Applying auth.0006_require_contenttypes_0002... OK
432 Applying auth.0007_alter_validators_add_error_messages... OK
433 Applying auth.0008_alter_user_username_max_length... OK
434 Applying common.0001_initial... OK
435 Applying common.0002_auto_20160105_1702... OK
436 Applying environment.0001_initial... OK
437 Applying environment.0002_authentic_use_as_idp_for_self... OK
438 Applying environment.0003_auto_20150309_0811... OK
439 Applying environment.0004_fargo... OK
440 Applying environment.0005_variable_label... OK
441 Applying environment.0006_auto_20150708_0830... OK
442 Applying environment.0007_auto_20151008_1406... OK
443 Applying environment.0008_auto_20151021_1414... OK
444 Applying environment.0009_mandayejs... OK
445 Applying environment.0010_variable_auto... OK
446 Applying environment.0011_chrono... OK
447 Applying environment.0012_mandayejs_site_app... OK
448 Applying environment.0013_auto_20160226_1633... OK
449 Applying environment.0014_piwik... OK
450 Applying environment.0015_corbo... OK
451 Applying environment.0016_bijoe... OK
452 Applying environment.0017_hobo... OK
453 Applying environment.0018_auto_20161102_1929... OK
454 Applying mellon.0001_initial... OK
455 Applying profile.0001_initial... OK
456 Applying profile.0002_add_data... OK
457 Applying sessions.0001_initial... OK
458----------------------------- Captured stderr call -----------------------------
459exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant1.example.net'. You may need to add u'tenant1.example.net' to ALLOWED_HOSTS.
460exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant2.example.net'. You may need to add u'tenant2.example.net' to ALLOWED_HOSTS.
461------------------------------ Captured log call -------------------------------
462exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant1.example.net'. You may need to add u'tenant1.example.net' to ALLOWED_HOSTS.
463exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant2.example.net'. You may need to add u'tenant2.example.net' to ALLOWED_HOSTS.
464____________________________ test_tenant_middleware ____________________________
465
466tenants = [<Tenant: tenant1_example_net>, <Tenant: tenant2_example_net>]
467client = <django.test.client.Client object at 0x7fb102fd2350>
468
469 def test_tenant_middleware(tenants, client):
470 res = client.get('/', SERVER_NAME='invalid.example.net')
471> assert res.status_code == 404
472E assert 400 == 404
473E + where 400 = <HttpResponseBadRequest status_code=400, "text/html">.status_code
474
475tests_multitenant/test_settings.py:18: AssertionError
476---------------------------- Captured stdout setup -----------------------------
477=== Running migrate for schema tenant1_example_net
478Operations to perform:
479 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
480Running migrations:
481 Applying contenttypes.0001_initial... OK
482 Applying contenttypes.0002_remove_content_type_name... OK
483 Applying auth.0001_initial... OK
484 Applying auth.0002_alter_permission_name_max_length... OK
485 Applying auth.0003_alter_user_email_max_length... OK
486 Applying auth.0004_alter_user_username_opts... OK
487 Applying auth.0005_alter_user_last_login_null... OK
488 Applying auth.0006_require_contenttypes_0002... OK
489 Applying auth.0007_alter_validators_add_error_messages... OK
490 Applying auth.0008_alter_user_username_max_length... OK
491 Applying common.0001_initial... OK
492 Applying common.0002_auto_20160105_1702... OK
493 Applying environment.0001_initial... OK
494 Applying environment.0002_authentic_use_as_idp_for_self... OK
495 Applying environment.0003_auto_20150309_0811... OK
496 Applying environment.0004_fargo... OK
497 Applying environment.0005_variable_label... OK
498 Applying environment.0006_auto_20150708_0830... OK
499 Applying environment.0007_auto_20151008_1406... OK
500 Applying environment.0008_auto_20151021_1414... OK
501 Applying environment.0009_mandayejs... OK
502 Applying environment.0010_variable_auto... OK
503 Applying environment.0011_chrono... OK
504 Applying environment.0012_mandayejs_site_app... OK
505 Applying environment.0013_auto_20160226_1633... OK
506 Applying environment.0014_piwik... OK
507 Applying environment.0015_corbo... OK
508 Applying environment.0016_bijoe... OK
509 Applying environment.0017_hobo... OK
510 Applying environment.0018_auto_20161102_1929... OK
511 Applying mellon.0001_initial... OK
512 Applying profile.0001_initial... OK
513 Applying profile.0002_add_data... OK
514 Applying sessions.0001_initial... OK
515=== Running migrate for schema tenant2_example_net
516Operations to perform:
517 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
518Running migrations:
519 Applying contenttypes.0001_initial... OK
520 Applying contenttypes.0002_remove_content_type_name... OK
521 Applying auth.0001_initial... OK
522 Applying auth.0002_alter_permission_name_max_length... OK
523 Applying auth.0003_alter_user_email_max_length... OK
524 Applying auth.0004_alter_user_username_opts... OK
525 Applying auth.0005_alter_user_last_login_null... OK
526 Applying auth.0006_require_contenttypes_0002... OK
527 Applying auth.0007_alter_validators_add_error_messages... OK
528 Applying auth.0008_alter_user_username_max_length... OK
529 Applying common.0001_initial... OK
530 Applying common.0002_auto_20160105_1702... OK
531 Applying environment.0001_initial... OK
532 Applying environment.0002_authentic_use_as_idp_for_self... OK
533 Applying environment.0003_auto_20150309_0811... OK
534 Applying environment.0004_fargo... OK
535 Applying environment.0005_variable_label... OK
536 Applying environment.0006_auto_20150708_0830... OK
537 Applying environment.0007_auto_20151008_1406... OK
538 Applying environment.0008_auto_20151021_1414... OK
539 Applying environment.0009_mandayejs... OK
540 Applying environment.0010_variable_auto... OK
541 Applying environment.0011_chrono... OK
542 Applying environment.0012_mandayejs_site_app... OK
543 Applying environment.0013_auto_20160226_1633... OK
544 Applying environment.0014_piwik... OK
545 Applying environment.0015_corbo... OK
546 Applying environment.0016_bijoe... OK
547 Applying environment.0017_hobo... OK
548 Applying environment.0018_auto_20161102_1929... OK
549 Applying mellon.0001_initial... OK
550 Applying profile.0001_initial... OK
551 Applying profile.0002_add_data... OK
552 Applying sessions.0001_initial... OK
553----------------------------- Captured stderr call -----------------------------
554exception.py 80 ERROR Invalid HTTP_HOST header: 'invalid.example.net'. You may need to add u'invalid.example.net' to ALLOWED_HOSTS.
555------------------------------ Captured log call -------------------------------
556exception.py 80 ERROR Invalid HTTP_HOST header: 'invalid.example.net'. You may need to add u'invalid.example.net' to ALLOWED_HOSTS.
557______________________________ test_xforwardedfor ______________________________
558
559settings = <pytest_django.fixtures.SettingsWrapper object at 0x7fb1030ec590>
560tenants = [<Tenant: tenant1_example_net>, <Tenant: tenant2_example_net>]
561client = <django.test.client.Client object at 0x7fb10a8efa10>
562
563 def test_xforwardedfor(settings, tenants, client):
564 settings.USE_X_FORWARDED_FOR = True
565 for tenant in tenants:
566 response = client.get('/', SERVER_NAME=tenant.domain_url,
567 HTTP_X_FORWARDED_FOR='99.99.99.99, 127.0.0.1')
568> assert '99.99.99.99' in response.content
569E assert '99.99.99.99' in '<h1>Bad Request (400)</h1>'
570E + where '<h1>Bad Request (400)</h1>' = <HttpResponseBadRequest status_code=400, "text/html">.content
571
572tests_multitenant/test_xforwardedfor.py:9: AssertionError
573---------------------------- Captured stdout setup -----------------------------
574=== Running migrate for schema tenant1_example_net
575Operations to perform:
576 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
577Running migrations:
578 Applying contenttypes.0001_initial... OK
579 Applying contenttypes.0002_remove_content_type_name... OK
580 Applying auth.0001_initial... OK
581 Applying auth.0002_alter_permission_name_max_length... OK
582 Applying auth.0003_alter_user_email_max_length... OK
583 Applying auth.0004_alter_user_username_opts... OK
584 Applying auth.0005_alter_user_last_login_null... OK
585 Applying auth.0006_require_contenttypes_0002... OK
586 Applying auth.0007_alter_validators_add_error_messages... OK
587 Applying auth.0008_alter_user_username_max_length... OK
588 Applying common.0001_initial... OK
589 Applying common.0002_auto_20160105_1702... OK
590 Applying environment.0001_initial... OK
591 Applying environment.0002_authentic_use_as_idp_for_self... OK
592 Applying environment.0003_auto_20150309_0811... OK
593 Applying environment.0004_fargo... OK
594 Applying environment.0005_variable_label... OK
595 Applying environment.0006_auto_20150708_0830... OK
596 Applying environment.0007_auto_20151008_1406... OK
597 Applying environment.0008_auto_20151021_1414... OK
598 Applying environment.0009_mandayejs... OK
599 Applying environment.0010_variable_auto... OK
600 Applying environment.0011_chrono... OK
601 Applying environment.0012_mandayejs_site_app... OK
602 Applying environment.0013_auto_20160226_1633... OK
603 Applying environment.0014_piwik... OK
604 Applying environment.0015_corbo... OK
605 Applying environment.0016_bijoe... OK
606 Applying environment.0017_hobo... OK
607 Applying environment.0018_auto_20161102_1929... OK
608 Applying mellon.0001_initial... OK
609 Applying profile.0001_initial... OK
610 Applying profile.0002_add_data... OK
611 Applying sessions.0001_initial... OK
612=== Running migrate for schema tenant2_example_net
613Operations to perform:
614 Apply all migrations: auth, common, contenttypes, environment, mellon, profile, sessions
615Running migrations:
616 Applying contenttypes.0001_initial... OK
617 Applying contenttypes.0002_remove_content_type_name... OK
618 Applying auth.0001_initial... OK
619 Applying auth.0002_alter_permission_name_max_length... OK
620 Applying auth.0003_alter_user_email_max_length... OK
621 Applying auth.0004_alter_user_username_opts... OK
622 Applying auth.0005_alter_user_last_login_null... OK
623 Applying auth.0006_require_contenttypes_0002... OK
624 Applying auth.0007_alter_validators_add_error_messages... OK
625 Applying auth.0008_alter_user_username_max_length... OK
626 Applying common.0001_initial... OK
627 Applying common.0002_auto_20160105_1702... OK
628 Applying environment.0001_initial... OK
629 Applying environment.0002_authentic_use_as_idp_for_self... OK
630 Applying environment.0003_auto_20150309_0811... OK
631 Applying environment.0004_fargo... OK
632 Applying environment.0005_variable_label... OK
633 Applying environment.0006_auto_20150708_0830... OK
634 Applying environment.0007_auto_20151008_1406... OK
635 Applying environment.0008_auto_20151021_1414... OK
636 Applying environment.0009_mandayejs... OK
637 Applying environment.0010_variable_auto... OK
638 Applying environment.0011_chrono... OK
639 Applying environment.0012_mandayejs_site_app... OK
640 Applying environment.0013_auto_20160226_1633... OK
641 Applying environment.0014_piwik... OK
642 Applying environment.0015_corbo... OK
643 Applying environment.0016_bijoe... OK
644 Applying environment.0017_hobo... OK
645 Applying environment.0018_auto_20161102_1929... OK
646 Applying mellon.0001_initial... OK
647 Applying profile.0001_initial... OK
648 Applying profile.0002_add_data... OK
649 Applying sessions.0001_initial... OK
650----------------------------- Captured stderr call -----------------------------
651exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant1.example.net'. You may need to add u'tenant1.example.net' to ALLOWED_HOSTS.
652------------------------------ Captured log call -------------------------------
653exception.py 80 ERROR Invalid HTTP_HOST header: 'tenant1.example.net'. You may need to add u'tenant1.example.net' to ALLOWED_HOSTS.
654===================== 3 failed, 15 passed in 33.67 seconds =====================
655ERROR: InvocationError: '/tmp/tox-cazino/hobo/coverage-dj111-multitenant/bin/py.test --junitxml=junit-coverage-dj111-multitenant.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_multitenant/'
656coverage-dj111-passerelle recreate: /tmp/tox-cazino/hobo/coverage-dj111-passerelle
657coverage-dj111-passerelle installdeps: django>=1.11,<1.12, pytest>=3.3.0,<3.4, pytest-cov, pytest-django, pytest-mock, coverage, raven, cssselect, WebTest, django-mellon, celery<4, http://git.entrouvert.org/passerelle.git/snapshot/passerelle-master.tar.gz, suds, python-memcached, git+http://git.entrouvert.org/debian/django-tenant-schemas.git@wip/github-remerge-2017, httmock
658coverage-dj111-passerelle develop-inst: /home/cazino/src/hobo
659coverage-dj111-passerelle installed: amqp==1.4.9,anyjson==0.3.3,attrs==17.4.0,beautifulsoup4==4.6.0,billiard==3.3.0.23,celery==3.1.25,certifi==2018.1.18,chardet==3.0.4,cmislib==0.5.1,contextlib2==0.5.5,coverage==4.5.1,cssselect==1.0.3,defusedxml==0.5.0,Django==1.11.11,django-jsonfield==1.0.1,django-mellon==1.2.34,django-model-utils==3.1.1,django-tenant-schemas==1.5.2.1.259+gd05d660,feedparser==5.2.1,funcsigs==1.0.2,gadjo==0.47,-e git+ssh://git@git.entrouvert.org/hobo.git@96208f6b0608ebacb2eff3ab004db3791de5b4fc#egg=hobo,httmock==1.2.6,idna==2.6,iso8601==0.1.12,isodate==0.6.0,kombu==3.0.37,lml==0.0.1,lxml==4.2.0,mock==2.0.0,odfpy==1.3.6,passerelle==0,pbr==3.1.1,phpserialize==1.3,Pillow==5.0.0,pluggy==0.6.0,prometheus-client==0.1.1,psycopg2==2.7.4,py==1.5.2,pyexcel-io==0.4.4,pyexcel-ods==0.4.1,pyexcel-xls==0.4.1,pyproj==1.9.5.1,pytest==3.3.2,pytest-cov==2.5.1,pytest-django==3.1.2,pytest-mock==1.7.1,python-dateutil==2.7.0,python-memcached==1.59,pytz==2018.3,raven==6.6.0,requests==2.18.4,six==1.11.0,SOAPpy==0.12.22,suds==0.4,urllib3==1.22,waitress==1.1.0,WebOb==1.7.4,WebTest==2.0.29,wstools==0.4.5,xlrd==1.1.0,xlwt==1.3.0,XStatic==1.0.1,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.10.2.1,XStatic-jquery-ui==1.12.0.1,XStatic-OpenSans==1.0.0
660coverage-dj111-passerelle runtests: PYTHONHASHSEED='974708195'
661coverage-dj111-passerelle runtests: commands[0] | ./getlasso.sh
662'/tmp/tox-cazino/hobo/coverage-dj111-passerelle/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python2.7/dist-packages/lasso.py'
663'/tmp/tox-cazino/hobo/coverage-dj111-passerelle/lib/python2.7/site-packages/_lasso.x86_64-linux-gnu.so' -> '/usr/lib/python2.7/dist-packages/_lasso.x86_64-linux-gnu.so'
664coverage-dj111-passerelle runtests: commands[1] | py.test --junitxml=junit-coverage-dj111-passerelle.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_passerelle/
665============================= test session starts ==============================
666platform linux2 -- Python 2.7.14+, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
667Django settings: passerelle.settings (from environment variable)
668rootdir: /home/cazino/src/hobo, inifile:
669plugins: mock-1.7.1, django-3.1.2, cov-2.5.1
670collected 1 item
671
672tests_passerelle/test_deploy.py E [100%]
673
674 generated xml file: /home/cazino/src/hobo/junit-coverage-dj111-passerelle.xml -
675
676---------- coverage: platform linux2, python 2.7.14-final-0 ----------
677Coverage XML written to file coverage.xml
678
679==================================== ERRORS ====================================
680___________________ ERROR at setup of test_deploy_specifics ____________________
681
682request = <SubRequest 'django_db_setup' for <Function 'test_deploy_specifics'>>
683django_test_environment = None
684django_db_blocker = <pytest_django.plugin._DatabaseBlocker object at 0x7f7f64250250>
685django_db_use_migrations = True, django_db_keepdb = False
686django_db_modify_db_settings = None
687
688 @pytest.fixture(scope='session')
689 def django_db_setup(
690 request,
691 django_test_environment,
692 django_db_blocker,
693 django_db_use_migrations,
694 django_db_keepdb,
695 django_db_modify_db_settings,
696 ):
697 """Top level fixture to ensure test databases are available"""
698 from .compat import setup_databases, teardown_databases
699
700 setup_databases_args = {}
701
702 if not django_db_use_migrations:
703 _disable_native_migrations()
704
705 if django_db_keepdb:
706 if get_django_version() >= (1, 8):
707 setup_databases_args['keepdb'] = True
708 else:
709 # Django 1.7 compatibility
710 from .db_reuse import monkey_patch_creation_for_db_reuse
711
712 with django_db_blocker.unblock():
713 monkey_patch_creation_for_db_reuse()
714
715 with django_db_blocker.unblock():
716 db_cfg = setup_databases(
717 verbosity=pytest.config.option.verbose,
718 interactive=False,
719> **setup_databases_args
720 )
721
722/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/pytest_django/fixtures.py:97:
723_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
724/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/test/utils.py:187: in setup_databases
725 serialize=connection.settings_dict.get('TEST', {}).get('SERIALIZE', True),
726/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/backends/base/creation.py:69: in create_test_db
727 run_syncdb=True,
728/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/core/management/__init__.py:131: in call_command
729 return command.execute(*args, **defaults)
730/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/core/management/base.py:330: in execute
731 output = self.handle(*args, **options)
732hobo/multitenant/management/commands/migrate_schemas.py:54: in handle
733 self.run_migrations(tenant.schema_name, settings.TENANT_APPS)
734hobo/multitenant/management/commands/migrate_schemas.py:61: in run_migrations
735 command.execute(*self.args, **self.options)
736/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/core/management/base.py:330: in execute
737 output = self.handle(*args, **options)
738/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py:83: in handle
739 executor = MigrationExecutor(connection, self.migration_progress_callback)
740/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/migrations/executor.py:20: in __init__
741 self.loader = MigrationLoader(self.connection)
742/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/migrations/loader.py:52: in __init__
743 self.build_graph()
744/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/migrations/loader.py:209: in build_graph
745 self.applied_migrations = recorder.applied_migrations()
746/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/migrations/recorder.py:65: in applied_migrations
747 self.ensure_schema()
748_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
749
750self = <django.db.migrations.recorder.MigrationRecorder object at 0x7f7f57d11f50>
751
752 def ensure_schema(self):
753 """
754 Ensures the table exists and has the correct schema.
755 """
756 # If the table's there, that's fine - we've never changed its schema
757 # in the codebase.
758 if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):
759 return
760 # Make the table
761 try:
762 with self.connection.schema_editor() as editor:
763 editor.create_model(self.Migration)
764 except DatabaseError as exc:
765> raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
766E MigrationSchemaMissing: Unable to create the django_migrations table (relation "django_migrations" already exists
767E )
768
769/tmp/tox-cazino/hobo/coverage-dj111-passerelle/local/lib/python2.7/site-packages/django/db/migrations/recorder.py:59: MigrationSchemaMissing
770---------------------------- Captured stderr setup -----------------------------
771Got an error creating the test database: database "test_passerelle" already exists
772
773=========================== 1 error in 5.82 seconds ============================
774ERROR: InvocationError: '/tmp/tox-cazino/hobo/coverage-dj111-passerelle/bin/py.test --junitxml=junit-coverage-dj111-passerelle.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc tests_passerelle/'
775___________________________________ summary ____________________________________
776ERROR: coverage-dj111-authentic: commands failed
777ERROR: coverage-dj111-hobo: commands failed
778 coverage-dj111-multipublik: commands succeeded
779ERROR: coverage-dj111-multitenant: commands failed
780ERROR: coverage-dj111-passerelle: commands failed