def test_basic(self): container = bootstrapped_container.init("test") foo = container.get(Foo) bar = container.get("injecta.mocks.Bar") self.assertIsInstance(foo, Foo) self.assertIsInstance(bar, Bar)
def test_azure(self): container = bootstrapped_container.init("test_azure") storage_configurator: StorageConfigurator = container.get( StorageConfigurator) spark_mock = SparkSessionMock() storage_configurator.configure(spark_mock) self.assertEqual("tenant/123456", spark_mock.conf.get("testing.storage.aaa")) self.assertEqual("secrets/some_client_id_scope1/some_client_id_key1", spark_mock.conf.get("testing.secrets.aaa.client_id")) self.assertEqual( "secrets/some_client_secret_scope1/some_client_secret_key1", spark_mock.conf.get("testing.secrets.aaa.client_secret")) self.assertEqual("tenant/987654", spark_mock.conf.get("testing.storage.bbb")) self.assertEqual("secrets/some_client_id_scope2/some_client_id_key2", spark_mock.conf.get("testing.secrets.bbb.client_id")) self.assertEqual( "secrets/some_client_secret_scope2/some_client_secret_key2", spark_mock.conf.get("testing.secrets.bbb.client_secret"))
def setUp(self): container = bootstrapped_container.init("test") self.__table_parameters_parser = container.get(TableParametersParser)
def test_azure(self): container = bootstrapped_container.init("test_azure") test_services(container)
def test_env_dev(self): container = bootstrapped_container.init("dev") test_services(container)
def test_env_prod(self): container = bootstrapped_container.init("prod") test_services(container)
def setUp(self): self._container = bootstrapped_container.init("test") self.max_diff = 8000 * 8
def test_basic(self): container = bootstrapped_container.init("test") test_services(container)