from unittest import TestCase
from unittest.mock import patch
import unittest
from module2 import function2


class TestModule2(TestCase):
    def test_function2(self):
        func1_value = 5
        with patch("module2.function1", return_value=func1_value) as patched_func1:
            function2_value = function2()
        assert function2_value == 2*func1_value


if __name__ == '__main__':
    unittest.main()
