1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00
SickRage/tests/issue_submitter_tests.py

49 lines
1.6 KiB
Python
Raw Permalink Normal View History

# coding=UTF-8
# Author: Dennis Lutter <lad1337@gmail.com>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SickRage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
from __future__ import with_statement
import unittest
import sys, os.path
from configobj import ConfigObj
sys.path.append(os.path.abspath('..'))
sys.path.append(os.path.abspath('../lib'))
import sickbeard
import test_lib as test
def error():
try:
raise Exception('FAKE EXCEPTION')
except Exception as e:
sickbeard.logger.log("FAKE ERROR: " + sickbeard.exceptions.ex(e), sickbeard.logger.ERROR)
sickbeard.logger.submit_errors()
raise
class IssueSubmitterBasicTests(unittest.TestCase):
def test_submitter(self):
self.assertRaises(Exception, error)
if __name__ == "__main__":
print "=================="
print "STARTING - ISSUE SUBMITTER TESTS"
print "=================="
print "######################################################################"
suite = unittest.TestLoader().loadTestsFromTestCase(IssueSubmitterBasicTests)