# Path: tests_python/util_tests.py
# class TestApp(TestCase):
# class NullAuthForm(Form):
# class NullAuth(AuthMethod):
# class TestLogin(TestApp):
#     def setUp(self):
#     def tearDown(self):
#     def login(self, form):
#     def view(self):
#     def form(self):
#     def setUp(self):
#     def login(self, username=None):
#     def normal_user(self):
#     def admin_user(self):
# def response(*args, **kwargs):
# def paxswill_zkillboard(url, request):
# def no_alliance_zkillboard(url, request):
# def foxfour_esi(url, request):


import re
from httmock import HTTMock
from evesrp import db
from evesrp.models import Request
from evesrp.auth import PermissionType
from evesrp.auth.models import Pilot, Division, Permission
from evesrp import views
from ...util_tests import TestLogin, all_mocks
            with HTTMock(*all_mocks):
                self.assertTrue(zkb_form.validate())
            # CREST
            crest_form = views.requests.RequestForm(
                    url=('https://esi.tech.ccp.is/v1/killmails/30290604/'
                         '787fb3714062f1700560d4a83ce32c67640b1797/'),
                    details='Foo',
                    division=division.id,
                    submit=True)
            crest_form.division.choices = divisions
            crest_form.details.raw_data = crest_form.details.data
            with HTTMock(*all_mocks):
                self.assertTrue(crest_form.validate())
            fail_form = views.requests.RequestForm(
                    url='http://google.com',
                    details='Foo',
                    division=division.id,
                    submit=True)
            fail_form.division.choices = divisions
            fail_form.details.raw_data = fail_form.details.data
            self.assertFalse(fail_form.validate())

    def test_submit_killmail(self):
        with self.app.test_request_context():
            user = self.normal_user
            pilot = Pilot(user, 'Paxswill', 570140137)
            db.session.add(pilot)
            db.session.commit()
            division = Division.query.filter_by(name='Division 1').one()
        client = self.login()

# Path: tests_python/util_tests.py
# class TestApp(TestCase):
# class NullAuthForm(Form):
# class NullAuth(AuthMethod):
# class TestLogin(TestApp):
#     def setUp(self):
#     def tearDown(self):
#     def login(self, form):
#     def view(self):
#     def form(self):
#     def setUp(self):
#     def login(self, username=None):
#     def normal_user(self):
#     def admin_user(self):
# def response(*args, **kwargs):
# def paxswill_zkillboard(url, request):
# def no_alliance_zkillboard(url, request):
# def foxfour_esi(url, request):


# Path: tests_python/views/requests/test_submit.py
import re
from httmock import HTTMock
from evesrp import db
from evesrp.models import Request
from evesrp.auth import PermissionType
from evesrp.auth.models import Pilot, Division, Permission
from evesrp import views
from ...util_tests import TestLogin, all_mocks

            with HTTMock(*all_mocks):
                self.assertTrue(zkb_form.validate())
            # CREST
            crest_form = views.requests.RequestForm(
                    url=('https://esi.tech.ccp.is/v1/killmails/30290604/'
                         '787fb3714062f1700560d4a83ce32c67640b1797/'),
                    details='Foo',
                    division=division.id,
                    submit=True)
            crest_form.division.choices = divisions
            crest_form.details.raw_data = crest_form.details.data
            with HTTMock(*all_mocks):
                self.assertTrue(crest_form.validate())
            fail_form = views.requests.RequestForm(
                    url='http://google.com',
                    details='Foo',
                    division=division.id,
                    submit=True)
            fail_form.division.choices = divisions
            fail_form.details.raw_data = fail_form.details.data
            self.assertFalse(fail_form.validate())

    def test_submit_killmail(self):
        with self.app.test_request_context():
            user = self.normal_user
            pilot = Pilot(user, 'Paxswill', 570140137)
            db.session.add(pilot)
            db.session.commit()
            division = Division.query.filter_by(name='Division 1').one()
        client = self.login()

        with HTTMock(*all_mocks):