import unittest
from tests import PluginTest
from plugins import voice
from CmdInterpreter import JarvisAPI
from Jarvis import Jarvis

# this test class contains test cases for the plugins "gtts" and "disable_gtts"
# which are included in the "voice.py" file in the "plugins" folder

class VoiceTest(PluginTest):

    # test "gtts" plugin
    def setUp(self):
        self.test = self.load_plugin(voice.gtts)

    def test_gtts(self):
        # run "gtts" plugin code
        self.test.run(voice.gtts)

        # verify that "gtts" plugin code works
        self.assertEqual(self.get_data('gtts_status'), True)


    # test "disable_gtts" plugin
    def setUp(self):
        self.test = self.load_plugin(voice.disable_gtts)

    def test_disable_gtts(self):
        # run "disable_gtts" plugin code
        self.test.run(voice.disable_gtts)

        # verify that "disable_gtts" plugin code works
        self.assertEqual(self.get_data('gtts_status'), False)

if __name__ == '__main__':
    unittest.main()

import unittest
from tests import PluginTest
from plugins import voice
from CmdInterpreter import JarvisAPI
from Jarvis import Jarvis

# this test class contains test cases for the plugins "gtts" and "disable_gtts"
# which are included in the "voice.py" file in the "plugins" folder

class VoiceTest(PluginTest):

    # test "gtts" plugin
    def setUp(self):
        self.test = self.load_plugin(voice.gtts)

    def test_gtts(self):
        # run "gtts" plugin code
        self.test.run(voice.gtts)

        # verify that "gtts" plugin code works
        self.assertEqual(self._jarvis.get_data('gtts_status'), True)


    # test "disable_gtts" plugin
    def setUp(self):
        self.test = self.load_plugin(voice.disable_gtts)

    def test_disable_gtts(self):
        # run "disable_gtts" plugin code
        self.test.run(voice.disable_gtts)

        # verify that "disable_gtts" plugin code works
        self.assertEqual(self._jarvis.get_data('gtts_status'), False)

if __name__ == '__main__':
    unittest.main()

Update test_voice.py