from pathlib import Path
import unittest


ROOT = Path(__file__).resolve().parents[1]


class ProductionArtifactTests(unittest.TestCase):
    def test_maintenance_scripts_are_not_deployable_from_document_root(self) -> None:
        forbidden = (
            "load.php",
            "test_candles.php",
            "test_candle_fetch.php",
            "test_missing_candles_mech.php",
            "test_redis_pub.php",
            "test_redis_sub.php",
            "redis_artifitial_publish.py",
            "redis_sub.py",
            "ws_client.py",
        )
        self.assertEqual([], [name for name in forbidden if (ROOT / name).exists()])


if __name__ == "__main__":
    unittest.main()
