コード例 #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
ファイル: tool_test.py プロジェクト: guozhonghua216/vdsm
    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)