1234567891011121314151617181920212223242526 |
- # File Name: appunittest2.py
- # Modified Date: March 24, 2017
- # Description: This class is for testing message of show error function
- __author__ = "Inyoung Choung"
- import os
- from os import path
- import unittest
- import app
- # testing Show Error function
- class testShowError(unittest.TestCase):
- def runTest(self):
- # initialize value to message variable.
- message = str("Here is a warning message.")
- # pass the predefined message into alert_message function.
- result = app.alert_message(message)
- # check if the two values in the parameter are matched.
- self.assertEqual(result, message)
- # class starter
- if __name__ == '__main__':
- unittest.main()
|