def test_set_none(self):
        User, Address = self.classes.User, self.classes.Address

        sess = sessionmaker()()
        u1 = User(name='jack')
        a1 = Address(email_address='a1')
        a1.user = u1
        sess.add_all([u1, a1])
        sess.commit()

        # works for None too
        def go():
            a1.user = None
        self.assert_sql_count(testing.db, go, 0)

        assert a1 not in u1.addresses
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_backref_mutations.py/O2MCollectionTest.test_set_none/original