Interdiff:
diff --git a/test/py/ganeti.constants_unittest.py b/test/py/
ganeti.constants_unittest.py
index 75a4292..3139d7d 100755
--- a/test/py/ganeti.constants_unittest.py
+++ b/test/py/ganeti.constants_unittest.py
@@ -165,7 +165,7 @@ class TestDiskTemplateConstants(unittest.TestCase):
   def testMapToStorageTypes(self):
     for disk_template in constants.DISK_TEMPLATES:
       self.assertTrue(
-          constants.MAP_DISK_TEMPLATE_STORAGE_TYPE[disk_template] != None)
+          constants.MAP_DISK_TEMPLATE_STORAGE_TYPE[disk_template] is not
None)


 if __name__ == "__main__":



On Tue, Jul 23, 2013 at 3:45 PM, Helga Velroyen <hel...@google.com> wrote:

>
>
>
> On Tue, Jul 23, 2013 at 3:44 PM, Guido Trotter <ultrot...@google.com>wrote:
>
>> On Tue, Jul 23, 2013 at 3:43 PM, Guido Trotter <ultrot...@google.com>
>> wrote:
>> > On Tue, Jul 23, 2013 at 3:04 PM, Helga Velroyen <hel...@google.com>
>> wrote:
>> >> This patch adds some unit tests to ensure the consistency
>> >> of various constants regarding disk templates.
>> >>
>> >> Signed-off-by: Helga Velroyen <hel...@google.com>
>> >> ---
>> >>  test/py/ganeti.constants_unittest.py | 11 +++++++++++
>> >>  1 file changed, 11 insertions(+)
>> >>
>> >> diff --git a/test/py/ganeti.constants_unittest.py b/test/py/
>> ganeti.constants_unittest.py
>> >> index 0e21feb..75a4292 100755
>> >> --- a/test/py/ganeti.constants_unittest.py
>> >> +++ b/test/py/ganeti.constants_unittest.py
>> >> @@ -156,6 +156,17 @@ class TestConfdConstants(unittest.TestCase):
>> >>
>>  self.assertFalse(utils.FindDuplicates(constants.CONFD_REPL_STATUSES),
>> >>                       msg="Duplicated confd reply status code")
>> >>
>> >> +class TestDiskTemplateConstants(unittest.TestCase):
>> >> +
>> >> +  def testPreference(self):
>> >> +    self.assertEqual(set(constants.DISK_TEMPLATE_PREFERENCE),
>> >> +                     set(constants.DISK_TEMPLATES))
>> >> +
>> >> +  def testMapToStorageTypes(self):
>> >> +    for disk_template in constants.DISK_TEMPLATES:
>> >> +      self.assertTrue(
>> >> +          constants.MAP_DISK_TEMPLATE_STORAGE_TYPE[disk_template] !=
>> None)
>> >> +
>> >
>> > Should we use assertIsNotNone(x) ?
>> >
>>
>> Uhm, no, since it's 2.7+ only.
>> Well, should we use "is not None", then?
>>
>
> Okay, will fix that.
>
> Cheers,
> Helga
>
>

Reply via email to