@responses.activate
    def test_it_should_remove_child_advertisers_when_removing_agency(self):
        self.setup()
        with open('tests/fixtures/permissions.xml') as f:
            fixture = f.read()
        responses.add(responses.GET,
                      'https://api.mediamath.com/api/v2.0/users/10000/permissions',
                      body=fixture,
                      content_type='application/xml',
                      match_querystring=True)

        p = self.t1.get('users', 10000, child='permissions')
        remove_ids = [6, 7]

        for ad_id in remove_ids:
            assert ad_id in p.advertiser.keys(), 'Expected advertiser {} to be in access flags'.format(ad_id)

        p.remove('agency', 3)
        for ad_id in remove_ids:
            assert p.advertiser.keys() not in ad_id, 'child advertiser {} should have been removed but is still there'\
                .format(ad_id)
dataset/ETHPy150Open MediaMath/t1-python/tests/test_permissions.py/TestPermissions.test_it_should_remove_child_advertisers_when_removing_agency/swapped operands of `not in`