File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,17 @@ def test_postgres_schema_delete_and_create():
8686 pg_error = extract_postgres_error (exc_info .value )
8787 assert pg_error .pgcode == errorcodes .DEPENDENT_OBJECTS_STILL_EXIST
8888
89+ # Verify that the schema and table still exist
90+ assert _does_schema_exist (schema .name )
91+ with connection .cursor () as cursor :
92+ cursor .execute ("SELECT * FROM test.bla" )
93+ assert cursor .fetchone () == ("hello" ,)
94+
8995 # Dropping the schema should work with cascade=True
9096 schema = PostgresSchema .delete_and_create (schema .name , cascade = True )
9197 assert _does_schema_exist (schema .name )
9298
93- # Since the schema was deleteped and re-created, the `bla`
99+ # Since the schema was deleted and re-created, the `bla`
94100 # table should not exist anymore.
95101 with pytest .raises (ProgrammingError ) as exc_info :
96102 with connection .cursor () as cursor :
You can’t perform that action at this time.
0 commit comments