'copying a user should automatically copy its partner, too'

@mute_logger('odoo.models')
def test_copy(self):

    user_foo = self.env['res.users'].create({'name': 'Foo', 'login': 'foo', 'supplier': True})
    (foo_before,) = user_foo.read()
    del foo_before['__last_update']
    user_bar = user_foo.copy({'login': 'bar'})
    (foo_after,) = user_foo.read()
    del foo_after['__last_update']
    self.assertEqual(foo_before, foo_after)
    self.assertEqual(user_bar.name, 'Foo    (copy)')
    self.assertEqual(user_bar.login, 'bar')
    self.assertEqual(user_foo.supplier, user_bar.supplier)
    self.assertNotEqual(user_foo.id, user_bar.id)
    self.assertNotEqual(user_foo.partner_id.id, user_bar.partner_id.id)
