In the following test: ```def test_pipeline_assets...
# ask-community
f
In the following test:
Copy code
def test_pipeline_assets():  
     result = (
        materialize_to_memory(
            assets=[get_stuff],
            resources={
                "conn": redshift_connection,
                "pipeline_configuration": {
                    "target_district": "BLORG",
                    "source_schema": "FOO",
                    "output_schema": "BAR",
                },
            },
        ),
    )
    assert result.success
I get the error: AttributeError: 'tuple' object has no attribute 'success' what attribute of result should I use instead of success?
d
Hi Fred - this looks like a Python gotcha to me that I've been bit by several times before- you're actually setting
result
to a Python tuple with a single element
(Because of stray parentheses and commas)
f
Can you make a quick recommendation?
a
Copy code
def test_pipeline_assets():  
     result = materialize_to_memory(
        assets=[get_stuff],
        resources={
            "conn": redshift_connection,
            "pipeline_configuration": {
                "target_district": "BLORG",
                "source_schema": "FOO",
                "output_schema": "BAR",
            },
        },
    )
    assert result.success
try that 🙂
🙏 1
The syntax you had before with an extra set of parenthesis can be used to split long lines into multiple lines, especially with chaining (I use it a lot in sqlalchemy), but that last
,
is what was converting it to a tuple instead.
f
Thank you very much