1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-05 17:05:03 -05:00
SickRage/tests/issue_submitter_tests.py
echel0n 3b37dc0540 Fixed issues with issue submitter and pastebin logs.
Added test for issue submitter.
2014-12-20 05:49:35 -08:00

49 lines
1.6 KiB
Python

# 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)