(capsul-flask-v3enmf6D) forest@thingpad:~/Desktop/git/capsul-flask$ python3 -m unittest; cat unittest-log-output.log; rm unittest-log-output.log[2021-07-27 14:48:15,429] WARNING in shared: No MAIL_SERVER configured. capsul will simply print emails to stdout.[2021-07-27 14:48:15,429] WARNING in shared: unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: builtins.ValueError: subsection not found
[2021-07-27 14:48:15,429] INFO in shared: is_running_server: True
[2021-07-27 14:48:15,467] INFO in base: Adding job tentatively -- it will be properly scheduled when the scheduler starts
[2021-07-27 14:48:15,468] INFO in base: Added job "heartbeat-task" to job store "default"
[2021-07-27 14:48:15,468] INFO in base: Scheduler started
[2021-07-27 14:48:15,468] DEBUG in base: Looking for jobs to run
[2021-07-27 14:48:15,468] DEBUG in base: Next wakeup is due at 2021-07-27 14:48:20.467256-05:00 (in 4.998467 seconds)
[2021-07-27 14:48:15,471] INFO in shared: loading schema migration scripts from /home/forest/Desktop/git/capsul-flask/capsulflask/schema_migrations
[2021-07-27 14:48:15,476] INFO in shared: schema is already up to date. current schemaVersion: "18"
..F...F.....
======================================================================
FAIL: test_create_fails_capacity (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 76, in test_create_fails_capacity
mock_method.assert_called()
File "/usr/lib/python3.8/unittest/mock.py", line 882, in assert_called
raise AssertionError(msg)
AssertionError: Expected 'capacity_avaliable' to have been called.
======================================================================
FAIL: test_create_succeeds (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 127, in test_create_succeeds
self.assertEqual(
AssertionError: 0 != 1
----------------------------------------------------------------------
Ran 12 tests in 0.752s
FAILED (failures=2)
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_loads: ERROR: console.create()!
ConsoleTests.test_create_loads: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_loads: ERROR: console.create()!
ConsoleTests.test_create_loads: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
```
(capsul-flask-v3enmf6D) forest@thingpad:~/Desktop/git/capsul-flask$ python3 -m unittest; cat unittest-log-output.log; rm unittest-log-output.log[2021-07-27 14:48:15,429] WARNING in shared: No MAIL_SERVER configured. capsul will simply print emails to stdout.[2021-07-27 14:48:15,429] WARNING in shared: unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: builtins.ValueError: subsection not found
[2021-07-27 14:48:15,429] INFO in shared: is_running_server: True
[2021-07-27 14:48:15,467] INFO in base: Adding job tentatively -- it will be properly scheduled when the scheduler starts
[2021-07-27 14:48:15,468] INFO in base: Added job "heartbeat-task" to job store "default"
[2021-07-27 14:48:15,468] INFO in base: Scheduler started
[2021-07-27 14:48:15,468] DEBUG in base: Looking for jobs to run
[2021-07-27 14:48:15,468] DEBUG in base: Next wakeup is due at 2021-07-27 14:48:20.467256-05:00 (in 4.998467 seconds)
[2021-07-27 14:48:15,471] INFO in shared: loading schema migration scripts from /home/forest/Desktop/git/capsul-flask/capsulflask/schema_migrations
[2021-07-27 14:48:15,476] INFO in shared: schema is already up to date. current schemaVersion: "18"
..F...F.....
======================================================================
FAIL: test_create_fails_capacity (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 76, in test_create_fails_capacity
mock_method.assert_called()
File "/usr/lib/python3.8/unittest/mock.py", line 882, in assert_called
raise AssertionError(msg)
AssertionError: Expected 'capacity_avaliable' to have been called.
======================================================================
FAIL: test_create_succeeds (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 127, in test_create_succeeds
self.assertEqual(
AssertionError: 0 != 1
----------------------------------------------------------------------
Ran 12 tests in 0.752s
FAILED (failures=2)
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_loads: ERROR: console.create()!
ConsoleTests.test_create_loads: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_capacity: ERROR: console.create()!
ConsoleTests.test_create_fails_capacity: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_credit: ERROR: console.create()!
ConsoleTests.test_create_fails_credit: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_fails_invalid: ERROR: console.create()!
ConsoleTests.test_create_fails_invalid: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_loads: ERROR: console.create()!
ConsoleTests.test_create_loads: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
ConsoleTests.test_create_succeeds: ERROR: console.create()!
ConsoleTests.test_create_succeeds: WARNING: when capsul capacity is restored, send an email to test@example.com
```
(capsul-flask-v3enmf6D) forest@thingpad:~/Desktop/git/capsul-flask$ python3 -m unittest; cat unittest-log-output.log; rm unittest-log-output.log
[2021-07-27 15:46:44,960] WARNING in shared: No MAIL_SERVER configured. capsul will simply print emails to stdout.
[2021-07-27 15:46:44,961] WARNING in shared: unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: builtins.ValueError: subsection not found
[2021-07-27 15:46:44,961] INFO in shared: is_running_server: True
[2021-07-27 15:46:45,000] INFO in base: Adding job tentatively -- it will be properly scheduled when the scheduler starts
[2021-07-27 15:46:45,001] INFO in base: Added job "heartbeat-task" to job store "default"
[2021-07-27 15:46:45,001] INFO in base: Scheduler started
[2021-07-27 15:46:45,001] DEBUG in base: Looking for jobs to run
[2021-07-27 15:46:45,001] DEBUG in base: Next wakeup is due at 2021-07-27 15:46:50.000596-05:00 (in 4.998649 seconds)
[2021-07-27 15:46:45,004] INFO in shared: loading schema migration scripts from /home/forest/Desktop/git/capsul-flask/capsulflask/schema_migrations
[2021-07-27 15:46:45,009] INFO in shared: schema is already up to date. current schemaVersion: "18"
* Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,036] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,082] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,123] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:45,145] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,170] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,174] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,192] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /hub/claim-operation/5/baikal HTTP/1.1" 200 -
[2021-07-27 15:46:46,196] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation/5 HTTP/1.1" 200 -
F * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,277] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,294] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,313] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,317] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,355] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,374] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,393] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,397] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,436] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,458] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,513] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,531] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,553] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,556] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
E * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,629] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,694] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,757] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83013aad90>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83012eedf0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f8300a5d9d0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83012a15e0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,827] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,888] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
.
======================================================================
ERROR: test_create_succeeds (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 144, in test_create_succeeds
response = client.post(url_for("console.create"), data=data)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 1016, in post
return self.open(*args, **kw)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/testing.py", line 222, in open
return Client.open(
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 970, in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 861, in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 1096, in run_wsgi_app
app_rv = app(environ, start_response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/forest/Desktop/git/capsul-flask/capsulflask/auth.py", line 31, in wrapped_view
return view(**kwargs)
File "/home/forest/Desktop/git/capsul-flask/capsulflask/console.py", line 261, in create
current_app.config["HUB_MODEL"].create(
File "/home/forest/Desktop/git/capsul-flask/capsulflask/hub_model.py", line 232, in create
raise ValueError(f"expected create capsul operation {operation_id} to be assigned to one host, it was assigned to {number_of_assigned} ({assigned_hosts_string})")
ValueError: expected create capsul operation 6 to be assigned to one host, it was assigned to 0 ()
======================================================================
FAIL: test_create_fails_capacity (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 96, in test_create_fails_capacity
self.assert200(response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask_testing/utils.py", line 341, in assert200
self.assertStatus(response, 200, message)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask_testing/utils.py", line 329, in assertStatus
self.assertEqual(response.status_code, status_code, message)
AssertionError: 302 != 200 : HTTP Status 200 expected but got 302
----------------------------------------------------------------------
Ran 12 tests in 3.956s
FAILED (failures=1, errors=1)
ConsoleTests.test_create_succeeds: ERROR: do_http (HTTP POST http://localhost:5000/spoke/operation/6) failed with: asyncio.exceptions.TimeoutError:
```
(capsul-flask-v3enmf6D) forest@thingpad:~/Desktop/git/capsul-flask$ python3 -m unittest; cat unittest-log-output.log; rm unittest-log-output.log
[2021-07-27 15:46:44,960] WARNING in shared: No MAIL_SERVER configured. capsul will simply print emails to stdout.
[2021-07-27 15:46:44,961] WARNING in shared: unable to create btcpay client. Capsul will work fine except cryptocurrency payments will not work. The error was: builtins.ValueError: subsection not found
[2021-07-27 15:46:44,961] INFO in shared: is_running_server: True
[2021-07-27 15:46:45,000] INFO in base: Adding job tentatively -- it will be properly scheduled when the scheduler starts
[2021-07-27 15:46:45,001] INFO in base: Added job "heartbeat-task" to job store "default"
[2021-07-27 15:46:45,001] INFO in base: Scheduler started
[2021-07-27 15:46:45,001] DEBUG in base: Looking for jobs to run
[2021-07-27 15:46:45,001] DEBUG in base: Next wakeup is due at 2021-07-27 15:46:50.000596-05:00 (in 4.998649 seconds)
[2021-07-27 15:46:45,004] INFO in shared: loading schema migration scripts from /home/forest/Desktop/git/capsul-flask/capsulflask/schema_migrations
[2021-07-27 15:46:45,009] INFO in shared: schema is already up to date. current schemaVersion: "18"
* Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,036] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,082] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:45,123] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:45,145] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,170] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,174] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:45,192] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:45] "POST /hub/claim-operation/5/baikal HTTP/1.1" 200 -
[2021-07-27 15:46:46,196] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation/5 HTTP/1.1" 200 -
F * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,277] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,294] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,313] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,317] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,355] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,374] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,393] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,397] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,436] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,458] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:46,513] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2021-07-27 15:46:46,531] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,553] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
[2021-07-27 15:46:46,556] INFO in _internal: 127.0.0.1 - - [27/Jul/2021 15:46:46] "POST /spoke/operation HTTP/1.1" 200 -
E * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,629] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,694] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,757] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83013aad90>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83012eedf0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f8300a5d9d0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/aiohttp/client.py:331: ResourceWarning: Unclosed client session <aiohttp.client.ClientSession object at 0x7f83012a15e0>
_warnings.warn(
ResourceWarning: Enable tracemalloc to get the object allocation traceback
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,827] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
. * Serving Flask app "capsulflask" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
[2021-07-27 15:46:48,888] INFO in _internal: * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
.
======================================================================
ERROR: test_create_succeeds (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 144, in test_create_succeeds
response = client.post(url_for("console.create"), data=data)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 1016, in post
return self.open(*args, **kw)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/testing.py", line 222, in open
return Client.open(
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 970, in open
response = self.run_wsgi_app(environ.copy(), buffered=buffered)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 861, in run_wsgi_app
rv = run_wsgi_app(self.application, environ, buffered=buffered)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/werkzeug/test.py", line 1096, in run_wsgi_app
app_rv = app(environ, start_response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/forest/Desktop/git/capsul-flask/capsulflask/auth.py", line 31, in wrapped_view
return view(**kwargs)
File "/home/forest/Desktop/git/capsul-flask/capsulflask/console.py", line 261, in create
current_app.config["HUB_MODEL"].create(
File "/home/forest/Desktop/git/capsul-flask/capsulflask/hub_model.py", line 232, in create
raise ValueError(f"expected create capsul operation {operation_id} to be assigned to one host, it was assigned to {number_of_assigned} ({assigned_hosts_string})")
ValueError: expected create capsul operation 6 to be assigned to one host, it was assigned to 0 ()
======================================================================
FAIL: test_create_fails_capacity (capsulflask.tests.test_console.ConsoleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/forest/Desktop/git/capsul-flask/capsulflask/tests/test_console.py", line 96, in test_create_fails_capacity
self.assert200(response)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask_testing/utils.py", line 341, in assert200
self.assertStatus(response, 200, message)
File "/home/forest/.local/share/virtualenvs/capsul-flask-v3enmf6D/lib/python3.8/site-packages/flask_testing/utils.py", line 329, in assertStatus
self.assertEqual(response.status_code, status_code, message)
AssertionError: 302 != 200 : HTTP Status 200 expected but got 302
----------------------------------------------------------------------
Ran 12 tests in 3.956s
FAILED (failures=1, errors=1)
ConsoleTests.test_create_succeeds: ERROR: do_http (HTTP POST http://localhost:5000/spoke/operation/6) failed with: asyncio.exceptions.TimeoutError:
```
............
----------------------------------------------------------------------
Ran 12 tests in 3.133s
OK
That was running in Docker. LGTM!
```
............
----------------------------------------------------------------------
Ran 12 tests in 3.133s
OK
```
That was running in Docker. LGTM!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
29f070b202toc0bc65ed3dThat was running in Docker. LGTM!