Revision 716a32cb test/ganeti.utils_unittest.py
b/test/ganeti.utils_unittest.py | ||
---|---|---|
39 | 39 |
import warnings |
40 | 40 |
import distutils.version |
41 | 41 |
import glob |
42 |
import md5 |
|
43 | 42 |
import errno |
44 | 43 |
|
45 | 44 |
import ganeti |
46 | 45 |
import testutils |
47 | 46 |
from ganeti import constants |
47 |
from ganeti import compat |
|
48 | 48 |
from ganeti import utils |
49 | 49 |
from ganeti import errors |
50 | 50 |
from ganeti import serializer |
... | ... | |
670 | 670 |
data = utils.ReadFile(self._TestDataFilename("cert1.pem")) |
671 | 671 |
self.assertEqual(len(data), 814) |
672 | 672 |
|
673 |
h = md5.new()
|
|
673 |
h = compat.md5_hash()
|
|
674 | 674 |
h.update(data) |
675 | 675 |
self.assertEqual(h.hexdigest(), "a491efb3efe56a0535f924d5f8680fd4") |
676 | 676 |
|
... | ... | |
679 | 679 |
size=100) |
680 | 680 |
self.assertEqual(len(data), 100) |
681 | 681 |
|
682 |
h = md5.new()
|
|
682 |
h = compat.md5_hash()
|
|
683 | 683 |
h.update(data) |
684 | 684 |
self.assertEqual(h.hexdigest(), "893772354e4e690b9efd073eed433ce7") |
685 | 685 |
|
Also available in: Unified diff