auth/credentials/tests: Python 3.6 avoid deepcopy error
authorNoel Power <noel.power@suse.com>
Thu, 6 Dec 2018 14:18:08 +0000 (14:18 +0000)
committerNoel Power <npower@samba.org>
Mon, 10 Dec 2018 09:38:24 +0000 (10:38 +0100)
commitcc11f71820c9669488bed9f1b02c815776d6d0c3
treef2c18d9a9564e97c396d08b1125cfe415801bc32
parentb209def154c5427a62362ae903d432959e7260d2
auth/credentials/tests: Python 3.6 avoid deepcopy error

In PY3 both deepcopy & (shallow)copy fail with

  Traceback (most recent call last):
    File "auth/credentials/tests/bind.py", line 42, in <module>
      creds_machine = copy.copy(creds)
    File "/usr/lib64/python3.6/copy.py", line 96, in copy
      rv = reductor(4)
  TypeError: can't pickle credentials.Credentials objects

This patch avoids the nasty copies but creating and populating the
Credential objects instead of copying

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
auth/credentials/tests/bind.py