Test a decorated function in Python

I have a python function which is decorated.

    def add_something(
        argument1 = None,

          """adding something"""

I've written tests for the given as below.

    @patch("other inside function to mock")
    @patch("other insdie function to mock 2")
    def test_add_something(
        self, mock_1, mock_2
        """ some logic to test the add something method """

But I am getting this error that says add_somehthing takes 1 positional argument.

TypeError: add_something() takes 1 positional argument but 3 were given

1 answer

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum