comparison test/test_hyperdbvals.py @ 7670:a28ea83ace86

issue2551296 - from mock import Mock? Fix mock import for newer python3 to use unittest.mock rather than mock.
author John Rouillard <rouilj@ieee.org>
date Tue, 24 Oct 2023 09:23:16 -0400
parents 978285986b2c
children 69e6bcb39f90
comparison
equal deleted inserted replaced
7669:fa5c3c86bcf2 7670:a28ea83ace86
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 10
11 import unittest, os, shutil, errno, sys, difflib, re 11 import unittest, os, shutil, errno, sys, difflib, re
12 from hashlib import sha1 12 from hashlib import sha1
13 from mock import Mock 13 try:
14 from unittest.mock import Mock
15 except ImportError:
16 # python 2.7
17 from mock import Mock
14 18
15 from roundup import init, instance, password, hyperdb, date 19 from roundup import init, instance, password, hyperdb, date
16 20
17 class TestClass: 21 class TestClass:
18 def getprops(self): 22 def getprops(self):

Roundup Issue Tracker: http://roundup-tracker.org/