示例#1
2
文件: tool_test.py 项目: nirs/vdsm
    def testCheckIsConfiguredNo(self):
        tmpfile = tempfile.mktemp()
        with open(tmpfile, 'w') as f:
            f.write("\n")
            f.write("\n")
            f.write("mech_list: gssapi\n")

        passwd._SASL2_CONF = tmpfile
        self.assertEqual(passwd.libvirt_sasl_isconfigured(), NO)
示例#2
0
    def testCheckIsConfiguredNo(self):
        tmpfile = tempfile.mktemp()
        with open(tmpfile, 'w') as f:
            f.write("\n" "\n" "mech_list: gssapi\n")

        passwd._SASL2_CONF = tmpfile
        self.assertEqual(passwd.libvirt_sasl_isconfigured(), NO)
示例#3
0
    def testCheckIsConfiguredNo(self):
        with tempfile.NamedTemporaryFile(mode='w+') as f:
            f.write("\n" "\n" "mech_list: gssapi\n")
            f.flush()

            passwd._SASL2_CONF = f.name
            self.assertEqual(passwd.libvirt_sasl_isconfigured(), NO)
示例#4
0
 def testCheckIsConfiguredMaybe(self):
     tmpfile = tempfile.mktemp()
     with open(tmpfile, 'w') as f:
         f.write("\n")
     passwd._SASL2_CONF = tmpfile
     self.assertEqual(passwd.libvirt_sasl_isconfigured(), MAYBE)
示例#5
0
文件: tool_test.py 项目: nirs/vdsm
 def testCheckIsConfiguredMaybe(self):
     tmpfile = tempfile.mktemp()
     with open(tmpfile, 'w') as f:
         f.write("\n")
     passwd._SASL2_CONF = tmpfile
     self.assertEqual(passwd.libvirt_sasl_isconfigured(), MAYBE)
示例#6
0
 def testCheckIsConfiguredMaybe(self):
     with tempfile.NamedTemporaryFile(mode='w+') as f:
         f.write("\nmech_list: scram-sha-256\n")
         f.flush()
         passwd._SASL2_CONF = f.name
         self.assertEqual(passwd.libvirt_sasl_isconfigured(), MAYBE)