def test_get_info_1(a): """Test get_info.""" resp = DatabaseIngestion.get_info("test") assert resp == {'error': 'No information in the records', 'is_valid': False} a.side_effect = SQLAlchemyError() with pytest.raises(Exception): DatabaseIngestion.get_info("test") a.side_effect = Exception() with pytest.raises(Exception): DatabaseIngestion.get_info("test")
def test_get_info(): """Test get_info.""" resp = DatabaseIngestion.get_info(None) assert resp == {'error': 'No key found', 'is_valid': False}