{"id":37085510,"url":"https://github.com/ulamlabs/celery-mock","last_synced_at":"2026-01-14T10:31:06.258Z","repository":{"id":62561278,"uuid":"87422998","full_name":"ulamlabs/celery-mock","owner":"ulamlabs","description":"Easy way to defer celery tasks in tests","archived":false,"fork":false,"pushed_at":"2023-01-01T12:44:15.000Z","size":20,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-30T07:27:27.599Z","etag":null,"topics":["celery","mock","python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ulamlabs.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-06T11:43:52.000Z","updated_at":"2021-04-14T22:28:43.000Z","dependencies_parsed_at":"2023-01-31T22:20:28.720Z","dependency_job_id":null,"html_url":"https://github.com/ulamlabs/celery-mock","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ulamlabs/celery-mock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulamlabs%2Fcelery-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulamlabs%2Fcelery-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulamlabs%2Fcelery-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulamlabs%2Fcelery-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ulamlabs","download_url":"https://codeload.github.com/ulamlabs/celery-mock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ulamlabs%2Fcelery-mock/sbom","scorecard":{"id":907892,"data":{"date":"2025-08-11","repo":{"name":"github.com/ulamlabs/celery-mock","commit":"c61f27d7cdd02fcab44ed8b424ef68e44cb68806"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 2/15 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-858 / GHSA-q4xr-rc97-m4xx","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T18:00:48.805Z","repository_id":62561278,"created_at":"2025-08-24T18:00:48.805Z","updated_at":"2025-08-24T18:00:48.805Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","mock","python","testing"],"created_at":"2026-01-14T10:31:05.473Z","updated_at":"2026-01-14T10:31:06.252Z","avatar_url":"https://github.com/ulamlabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============================\nCelery Task Mocking\n===============================\n\n\n.. image:: https://img.shields.io/pypi/v/celery-mock.svg\n        :target: https://pypi.python.org/pypi/celery-mock\n\n.. image:: https://img.shields.io/travis/ulamlabs/celery-mock.svg\n        :target: https://travis-ci.org/ulamlabs/celery-mock\n\n.. image:: https://codecov.io/gh/ulamlabs/celery-mock/branch/master/graph/badge.svg\n  :target: https://codecov.io/gh/ulamlabs/celery-mock\n\n\ncelery-mock allows you to mock celery task and then run them when you want\n\nRationale\n==========\n\nSometimes a celery task retries itself to wait for some event or model to change.\nThis is hard to test because celery tasks run (and retry) inline in tests.\nNow you can choose when to run your tasks.\n\nSupported versions\n==================\n\n- Python 3 support\n- Celery 3.1.x and 4.0.x support \n\n\nHow to install\n================\n\n    .. code-block:: bash\n    \n        pip install celery-mock\n\n\nHow to use\n==========\n\n    .. code-block:: python\n    \n        from celery_mock import task_mock\n        from django.test import TestCase, Client\n        \n        from myapp import dummyview\n        \n        class UsersTestCase(TestCase):\n         \n            def test_create_user(self):\n                client = Client()\n                client.post('/api/users/', data={'username': 'konrad')  # runs tasks inline\n                \n                with task_mock():\n                    client.post('/api/users/', data={'username': 'konrad')\n                    # no tasks started yet\n                # all tasks ran here\n                \n                with task_mock('myapp.post_user_create_task'):\n                    client.post('/api/users/', data={'username': 'konrad')\n                    # all tasks started execept myapp.post_user_create_task\n                # myapp.post_user_create_task started here\n                \n                # you can use task_mock manually:\n                \n                tmock = task_mock().start()\n                client.post('/api/users/', data={'username': 'konrad')\n                # no tasks started yet\n                tomock.stop()  # all tasks ran here\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulamlabs%2Fcelery-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fulamlabs%2Fcelery-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fulamlabs%2Fcelery-mock/lists"}