import unittest


# NOTE: ignore the globals; this is not for seriousness....

patch.TEST_PREFIX = "foo"

value = 3
valu4 = 4
valu5 = 5


class LcSidMock:
    def __str__(self):
        return "str glux"


def get_cyan_mock():
    return "glux"


def get_dsn_mock():
    return ("", "", "")


def get_asdf():
    return "asdf"


def get_asdf_mock():
    return "haha zyxw"


class Thing(unittest.TestCase):
    def test_foo_zero(self):
        with patch.multiple(
            "tests.test_EnterpriseAppDb",
            value="not three",
            valu4="not 4",
            valu5="not 5",
        ) as mock:
            print(value)
            print(valu4)
            print(valu5)
            print(LcSidMock())

    def test_get_cyan_object(self):
        with patch("superhero_universe.config.get_cyan", LcSidMock):
            from superhero_universe.config import get_cyan, get_dsn

            print(get_cyan())
            print(LcSidMock())
            self.assertTrue(str(get_cyan()) == str(LcSidMock()))

    def test_get_cyan_func(self):
        with patch("superhero_universe.config.get_cyan", get_cyan_mock):
            from superhero_universe.config import get_cyan, get_dsn

            self.assertTrue(get_cyan() == get_cyan_mock())

    def test_foo_asdf(self):
        with patch("tests.test_EnterpriseAppDb.get_asdf", get_asdf_mock):
            self.assertTrue(get_asdf() == get_asdf_mock())

    def test_foo_one(self):
        print(value)

    def test_foo_two(self):
        print(value)


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