Skip to content

pull changes from dev branch #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/change-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: checkout code
uses: actions/checkout@v2

- name: setup python environment
uses: actions/setup-python@v2
with:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Security scan on all changes (Commits/PRs)

on:
push:
branches: ['main', 'master', 'pilots', 'dev']
pull_request:
types:
- opened

jobs:
code-check:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.7'
steps:
- name: checkout code
uses: actions/checkout@v2


- name: Checkmarx One ClI Action
uses: checkmarx/ast-github-action@main
with:
project_name: Python-v2
cx_tenant: Flutterwave
base_uri: https://eu.ast.checkmarx.net/
cx_client_id: ${{ secrets.CX_CLIENT_ID }}
cx_client_secret: ${{ secrets.CX_CLIENT_SECRET }}
additional_params: --scan-types sast,iac-security,api-security,sca,container-security
1 change: 0 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# Local imports
from rave_python import Rave, RaveExceptions, Misc
from rave_python.rave_exceptions import *
from example import *

load_dotenv()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2003-2013, Michael Foord & the mock team
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73 changes: 73 additions & 0 deletions testing/lib/python3.10/site-packages/mock-5.1.0.dist-info/METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
Metadata-Version: 2.1
Name: mock
Version: 5.1.0
Summary: Rolling backport of unittest.mock for all Pythons
Home-page: http://mock.readthedocs.org/en/latest/
Author: Testing Cabal
Author-email: [email protected]
Project-URL: Source, https://github.com/testing-cabal/mock
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.6
License-File: LICENSE.txt
Provides-Extra: build
Requires-Dist: twine ; extra == 'build'
Requires-Dist: wheel ; extra == 'build'
Requires-Dist: blurb ; extra == 'build'
Provides-Extra: docs
Requires-Dist: sphinx ; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'

mock is a library for testing in Python. It allows you to replace parts of
your system under test with mock objects and make assertions about how they
have been used.

mock is now part of the Python standard library, available as `unittest.mock
<https://docs.python.org/dev/library/unittest.mock.html>`_ in Python 3.3
onwards.

This package contains a rolling backport of the standard library mock code
compatible with Python 3.6 and up.

Please see the standard library documentation for more details.

:Homepage: `Mock Homepage`_
:Download: `Mock on PyPI`_
:Documentation: `Python Docs`_
:License: `BSD License`_
:Support: `Mailing list ([email protected])
<http://lists.idyll.org/listinfo/testing-in-python>`_
:Code: `GitHub
<https://github.com/testing-cabal/mock>`_
:Issue tracker: `GitHub Issues
<https://github.com/testing-cabal/mock/issues>`_
:Build status:
|CircleCI|_ |Docs|_

.. |CircleCI| image:: https://circleci.com/gh/testing-cabal/mock/tree/master.svg?style=shield
.. _CircleCI: https://circleci.com/gh/testing-cabal/mock/tree/master

.. |Docs| image:: https://readthedocs.org/projects/mock/badge/?version=latest
.. _Docs: http://mock.readthedocs.org/en/latest/

.. _Mock Homepage: http://mock.readthedocs.org/en/latest/
.. _BSD License: https://github.com/testing-cabal/mock/blob/master/LICENSE.txt
.. _Python Docs: https://docs.python.org/dev/library/unittest.mock.html
.. _mock on PyPI: https://pypi.org/project/mock/
13 changes: 13 additions & 0 deletions testing/lib/python3.10/site-packages/mock-5.1.0.dist-info/RECORD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mock-5.1.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
mock-5.1.0.dist-info/LICENSE.txt,sha256=WDHuFJ04ULKN-P8C-3vQfOzagehcyENcIIJ9OSIgLTQ,1342
mock-5.1.0.dist-info/METADATA,sha256=Iicx5nRT5scGjfpkiK-fn5XdZ5WLvD65RfWMPH_mIqY,3019
mock-5.1.0.dist-info/RECORD,,
mock-5.1.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
mock-5.1.0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
mock-5.1.0.dist-info/top_level.txt,sha256=YbGUYXa21gMdoMrELg81nnfkfBId5JGAm7K8bMU8hWQ,5
mock/__init__.py,sha256=BS2JIiTBFBFcvF-m-XOXhUMQox-UP0yyLGrVlIphqWc,334
mock/__pycache__/__init__.cpython-310.pyc,,
mock/__pycache__/backports.cpython-310.pyc,,
mock/__pycache__/mock.cpython-310.pyc,,
mock/backports.py,sha256=zxu3FnFkPFT-vy9LTYcER-dhDYcQSwHtbGIYavET3q8,2808
mock/mock.py,sha256=Tio5teqGbCUrNoyyO6E6KjoFbiatDpNEwjuI7wJ_ji8,110383
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.40.0)
Root-Is-Purelib: true
Tag: py3-none-any

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mock
15 changes: 15 additions & 0 deletions testing/lib/python3.10/site-packages/mock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from __future__ import absolute_import

import re, sys

IS_PYPY = 'PyPy' in sys.version

import mock.mock as _mock
from mock.mock import *

__version__ = '5.1.0'
version_info = tuple(int(p) for p in
re.match(r'(\d+).(\d+).(\d+)', __version__).groups())


__all__ = ('__version__', 'version_info') + _mock.__all__
89 changes: 89 additions & 0 deletions testing/lib/python3.10/site-packages/mock/backports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import sys


if sys.version_info[:2] < (3, 8):

import asyncio, functools
from asyncio.coroutines import _is_coroutine
from inspect import ismethod, isfunction, CO_COROUTINE
from unittest import TestCase

def _unwrap_partial(func):
while isinstance(func, functools.partial):
func = func.func
return func

def _has_code_flag(f, flag):
"""Return true if ``f`` is a function (or a method or functools.partial
wrapper wrapping a function) whose code object has the given ``flag``
set in its flags."""
while ismethod(f):
f = f.__func__
f = _unwrap_partial(f)
if not isfunction(f):
return False
return bool(f.__code__.co_flags & flag)

def iscoroutinefunction(obj):
"""Return true if the object is a coroutine function.

Coroutine functions are defined with "async def" syntax.
"""
return (
_has_code_flag(obj, CO_COROUTINE) or
getattr(obj, '_is_coroutine', None) is _is_coroutine
)


class IsolatedAsyncioTestCase(TestCase):

def __init__(self, methodName='runTest'):
super().__init__(methodName)
self._asyncioTestLoop = None
self._asyncioCallsQueue = None

async def _asyncioLoopRunner(self, fut):
self._asyncioCallsQueue = queue = asyncio.Queue()
fut.set_result(None)
while True:
query = await queue.get()
queue.task_done()
assert query is None

def _setupAsyncioLoop(self):
assert self._asyncioTestLoop is None
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.set_debug(True)
self._asyncioTestLoop = loop
fut = loop.create_future()
self._asyncioCallsTask = loop.create_task(self._asyncioLoopRunner(fut))
loop.run_until_complete(fut)

def _tearDownAsyncioLoop(self):
assert self._asyncioTestLoop is not None
loop = self._asyncioTestLoop
self._asyncioTestLoop = None
self._asyncioCallsQueue.put_nowait(None)
loop.run_until_complete(self._asyncioCallsQueue.join())

try:
# shutdown asyncgens
loop.run_until_complete(loop.shutdown_asyncgens())
finally:
asyncio.set_event_loop(None)
loop.close()

def run(self, result=None):
self._setupAsyncioLoop()
try:
return super().run(result)
finally:
self._tearDownAsyncioLoop()


else:

from asyncio import iscoroutinefunction
from unittest import IsolatedAsyncioTestCase

Loading
Loading