Tests / apps/api/tests.py
ProfileUploadTest::test_reject_other_formats
First seen 3 weeks ago in 78a4357
CI
github-actions:test
12 runs
Average
39 ms
median 39 ms
max 61 ms
max 61 ms
Phases
Setup 0.71 ms
Call 39 ms
Teardown 0.16 ms
Categories
Database 5 ms
Test code 0.51 ms
Other (Libraries, Unsampled, pytest, Logging) 34 ms
11 database queries per run
Needs 563 KB of memory (max 860 KB)
Duration per run
Where the time goes
Latest run in ci:github-actions:test, 16 hours ago ·
open run
setup1 ms2.3%
call44 ms97.4%
ProfileUploadTest.test_reject_other_formatsapps/api/tests.py:590 response = self.upload({"format": "something-else", "run": {}})41 ms88.9%
ProfileUploadTest.uploadapps/api/tests.py:487 response = self.client.post(41 ms88.9%
Client.postdjango/test/client.py:115341 ms88.9%
RequestFactory.postdjango/test/client.py:49941 ms88.9%
RequestFactory.genericdjango/test/client.py:67141 ms88.9%
Client.requestdjango/test/client.py:108241 ms88.9%
ClientHandler.__call__django/test/client.py:17335 ms76.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6235 ms76.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10435 ms76.2%
WhiteNoise.add_fileswhitenoise/base.py:10835 ms76.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12035 ms76.2%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13135 ms76.2%
WhiteNoise.get_static_filewhitenoise/base.py:20823 ms50.8%
StaticFile.__init__whitenoise/responders.py:7221 ms46.6%
StaticFile.get_file_statswhitenoise/responders.py:16121 ms46.6%
__init____init__:-121 ms46.6%
FileEntry.__init__whitenoise/responders.py:26321 ms46.6%
FileEntry.stat_regular_filewhitenoise/responders.py:27621 ms46.6%
<GC>~21 ms46.6%
StaticFile.__init__whitenoise/responders.py:742 ms4.2%
Headers.__getitem__<stdlib>/wsgiref/headers.py:832 ms4.2%
WhiteNoise.get_static_filewhitenoise/base.py:2026 ms12.7%
WhiteNoise.add_mime_headerswhitenoise/base.py:2162 ms4.2%
WhiteNoise.add_mime_headerswhitenoise/base.py:2212 ms4.2%
WhiteNoise.get_static_filewhitenoise/base.py:2034 ms8.5%
WhiteNoise.add_cache_headerswhitenoise/base.py:2244 ms8.5%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1762 ms4.2%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1972 ms4.2%
URLMixin.urldebug_toolbar/panels/staticfiles.py:202 ms4.2%
WhiteNoise.get_static_filewhitenoise/base.py:2122 ms4.2%
ClientHandler.__call__django/test/client.py:1864 ms8.5%
BaseHandler.get_responsedjango/core/handlers/base.py:1414 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1304 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1234 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
MiddlewareMixin.__call__django/utils/deprecation.py:3094 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:344 ms8.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:554 ms8.5%
BaseHandler._get_responsedjango/core/handlers/base.py:1984 ms8.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:654 ms8.5%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:374 ms8.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:644 ms8.5%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:72 project = get_object_or_404(Project, secrettokens__token=request.headers.get("Authorization"))2 ms4.2%
get_object_or_404django/shortcuts.py:902 ms4.2%
QuerySet.getdjango/db/models/query.py:6352 ms4.2%
QuerySet.__len__django/db/models/query.py:3722 ms4.2%
QuerySet._fetch_alldjango/db/models/query.py:20002 ms4.2%
ModelIterable.__iter__django/db/models/query.py:952 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:73 touch_token(request.headers.get("Authorization"))2 ms4.2%
touch_tokenapps/api/urls.py:59 SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)2 ms4.2%
QuerySet.updatedjango/db/models/query.py:13002 ms4.2%
SQLUpdateCompiler.execute_sqldjango/db/models/sql/compiler.py:21112 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16242 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms4.2%
Cursor.executepsycopg/cursor.py:1132 ms4.2%
Connection.waitpsycopg/connection.py:4952 ms4.2%
ClientHandler.__call__django/test/client.py:1772 ms4.2%
Signal.connectdjango/dispatch/dispatcher.py:932 ms4.2%
ProfileUploadTest.test_reject_other_formatsapps/api/tests.py:593 self.assertFalse(Profile.objects.exists())2 ms4.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:872 ms4.2%
QuerySet.existsdjango/db/models/query.py:13372 ms4.2%
Query.has_resultsdjango/db/models/sql/query.py:6812 ms4.2%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15922 ms4.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16112 ms4.2%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7672 ms4.2%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:862 ms4.2%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:752 ms4.2%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2712 ms4.2%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()2 ms4.2%
TestCase._fixture_teardowndjango/test/testcases.py:14952 ms4.2%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4842 ms4.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms4.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms4.2%
Estimated from 24 samples; phase durations are exact. Frames from pytest and pluggy are
hidden
.
Hot lines in your code
|
apps/api/tests.py:487
response = self.client.post(
ProfileUploadTest.upload
· Libraries
|
37 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
|
2 ms |
|
apps/api/urls.py:59
SecretTokens.objects.filter(pk__in=list(stale)).update(date_last_used=now)
touch_token
· Database
|
2 ms |
|
apps/api/tests.py:593
self.assertFalse(Profile.objects.exists())
ProfileUploadTest.test_reject_other_formats
· Database
|
2 ms |
Fixtures
Exact setup time| _django_set_urlconf function | 0.30 ms |
| _template_string_if_invalid_marker function | 0.05 ms |
| _dj_autoclear_mailbox function | 0.05 ms |
| _django_db_marker function | 0.05 ms |
| _live_server_helper function | 0.05 ms |
| _django_clear_site_cache function | 0.03 ms |
| monkeypatch function | 0.02 ms |
Database
11 queries · 3 msNo repeated queries.
Biggest pieces of work
|
call test body
apps/api/tests.py:590
|
43 ms |
|
call _post_teardown
django/test/testcases.py:1240
|
2 ms |
| setup pytest internals | 1 ms |
Reliability
12 results · 0 CI failures · 0 local failuresThis test hasn't failed recently.
History
Latest 12 results, oldest first in the strip| When | Environment | Outcome | Duration | |
|---|---|---|---|---|
| 16 hours ago | CI github-actions:test | passed | 46 ms | Profile |
| 1 week, 5 days ago | CI github-actions:test | passed | 24 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 43 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 26 ms | Profile |
| 2 weeks, 1 day ago | CI github-actions:test | passed | 58 ms | Profile |
| 2 weeks, 2 days ago | CI github-actions:test | passed | 25 ms | Profile |
| 2 weeks, 4 days ago | CI github-actions:test | passed | 61 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 40 ms | Profile |
| 2 weeks, 6 days ago | CI github-actions:test | passed | 38 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 51 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 24 ms | Profile |
| 3 weeks ago | CI github-actions:test | passed | 38 ms | Profile |