Tests / apps/api/tests.py
ProfileUploadTest::test_no_token
First seen 1 month, 1 week ago in 78a4357
CI
github-actions:test
15 runs
Average
31 ms
median 34 ms
max 46 ms
max 46 ms
Phases
Setup 0.68 ms
Call 30 ms
Teardown 0.16 ms
Categories
Database 4 ms
Other (Libraries, Unsampled, pytest) 26 ms
6 database queries per run
Needs 531 KB of memory (max 872 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 2 weeks ago ·
open run
call25 ms97.1%
ProfileUploadTest.test_no_tokenapps/api/tests.py:622 response = self.client.post("/api/v1/profile", data=b"{}", content_type="application/json")21 ms80.9%
Client.postdjango/test/client.py:115321 ms80.9%
RequestFactory.postdjango/test/client.py:49921 ms80.9%
RequestFactory.genericdjango/test/client.py:67121 ms80.9%
Client.requestdjango/test/client.py:108221 ms80.9%
ClientHandler.__call__django/test/client.py:17317 ms64.7%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6217 ms64.7%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10417 ms64.7%
WhiteNoise.add_fileswhitenoise/base.py:10817 ms64.7%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12013 ms48.6%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13113 ms48.6%
WhiteNoise.get_static_filewhitenoise/base.py:2088 ms32.4%
StaticFile.__init__whitenoise/responders.py:774 ms16.2%
StaticFile.get_alternativeswhitenoise/responders.py:2004 ms16.2%
StaticFile.__init__whitenoise/responders.py:734 ms16.2%
StaticFile.get_headerswhitenoise/responders.py:1784 ms16.2%
WhiteNoise.get_static_filewhitenoise/base.py:2034 ms16.2%
WhiteNoise.add_cache_headerswhitenoise/base.py:2244 ms16.2%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1764 ms16.2%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1974 ms16.2%
URLMixin.urldebug_toolbar/panels/staticfiles.py:204 ms16.2%
ClientHandler.__call__django/test/client.py:1864 ms16.2%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms16.2%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms16.2%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms16.2%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms16.2%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms16.2%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms16.2%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))4 ms16.2%
get_object_or_404django/shortcuts.py:904 ms16.2%
QuerySet.getdjango/db/models/query.py:6354 ms16.2%
QuerySet.__len__django/db/models/query.py:3724 ms16.2%
QuerySet._fetch_alldjango/db/models/query.py:20004 ms16.2%
ModelIterable.__iter__django/db/models/query.py:1274 ms16.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()4 ms16.2%
TestCase._fixture_teardowndjango/test/testcases.py:14954 ms16.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4834 ms16.2%
CursorWrapper.executedjango/db/backends/utils.py:794 ms16.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:924 ms16.2%
CursorWrapper._executedjango/db/backends/utils.py:1034 ms16.2%
Cursor.executepsycopg/cursor.py:1134 ms16.2%
Connection.waitpsycopg/connection.py:4954 ms16.2%
Estimated from 6 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/api/tests.py:622
response = self.client.post("/api/v1/profile", data=b"{}", content_type="application/json")
ProfileUploadTest.test_no_token
· Libraries
|
17 ms |
|
apps/api/urls.py:72
project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))
api_request.<locals>.decorator.<locals>.wrapped_view
· Database
|
4 ms |
Fixtures
Exact setup time| _dj_autoclear_mailbox function | 0.06 ms |
| _template_string_if_invalid_marker function | 0.06 ms |
| _django_db_marker function | 0.03 ms |
| _django_set_urlconf function | 0.03 ms |
| _django_clear_site_cache function | 0.02 ms |
| _live_server_helper function | 0.02 ms |
| monkeypatch function | 0.02 ms |
Database
6 queries · 1 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:622
|
21 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
4 ms |
Reliability
15 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 15 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 2 weeks ago | CI github-actions:test | passed | 26 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 34 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 17 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 37 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 19 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 29 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 23 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 46 ms | Profile |
| 1 month ago | CI github-actions:test | passed | 22 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 38 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 38 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 36 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 39 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 21 ms | Profile |
| 1 month, 1 week ago | CI github-actions:test | passed | 36 ms | Profile |