def testSambaPrimaryGroupSID_notUpdatedWhenFixed(self):
        """Test that sambaPrimaryGroupSID field is updated based on gidNumber."""
        client = testutil.LDAPClientTestDriver()
        o=ldapsyntax.LDAPEntryWithAutoFill(client=client,
                                            dn='cn=foo,dc=example,dc=com',
                                            attributes={
            'objectClass': ['sambaSamAccount', 'other'],
            })
        d = o.addAutofiller(sambaSamAccount.Autofill_samba(domainSID='foo',
                                                           fixedPrimaryGroupSID=4242))
        def cb(dummy):
            client.assertNothingSent()

            self.failUnless(o in 'sambaPrimaryGroupSID')
            self.failUnlessEqual(o['sambaPrimaryGroupSID'], ['foo-4242'])
            o['gidNumber'] = ['1000']
            self.failUnless('sambaPrimaryGroupSID' in o)
            self.failUnlessEqual(o['sambaPrimaryGroupSID'], ['foo-4242'])
        d.addCallback(cb)
        return d
dataset/ETHPy150Open antong/ldaptor/ldaptor/test/test_autofill_samba.py/LDAPAutoFill_sambaSamAccount.testSambaPrimaryGroupSID_notUpdatedWhenFixed/swapped operands of `in`