def test_validate_contains_none(self, mock_conn): with mock.patch.dict('src.etl.rds.CONFIG', self.config): rds = RDS() with self.assertRaises( ValidationException, msg="Should throw exception on a variable that is None."): rds.validate_contains("Variable", None) mock_conn.assert_called_once()
def test_validate_contains_text(self, mock_conn): with mock.patch.dict('src.etl.rds.CONFIG', self.config): rds = RDS() rds.validate_contains("Variable", "Contains") mock_conn.assert_called_once() self.assertTrue( True, "Should not throw exception on a variable that contains text.")
def test_validate_contains_none(self): rds = RDS() with self.assertRaises(ValidationException, msg="Should throw exception on a variable that is None."): rds.validate_contains("Variable", None)
def test_validate_contains_text(self): rds = RDS() rds.validate_contains("Variable", "Contains") self.assertTrue(True, "Should not throw exception on a variable that contains text.")