Beispiel #1
0
 def test_version(self):
     """
     Tests return server version from znc --version
     """
     mock = MagicMock(return_value="ZNC 1.2 - http://znc.in")
     with patch.dict(znc.__salt__, {"cmd.run": mock}):
         self.assertEqual(znc.version(), "ZNC 1.2")
Beispiel #2
0
 def test_version(self):
     '''
     Tests return server version from znc --version
     '''
     mock = MagicMock(return_value='ZNC 1.2 - http://znc.in')
     with patch.dict(znc.__salt__, {'cmd.run': mock}):
         self.assertEqual(znc.version(), 'ZNC 1.2')
Beispiel #3
0
 def test_version(self):
     """
     Tests return server version from znc --version
     """
     mock = MagicMock(return_value="ZNC 1.2 - http://znc.in")
     with patch.dict(znc.__salt__, {"cmd.run": mock}):
         self.assertEqual(znc.version(), "ZNC 1.2")