Пример #1
0
 def __init__(
     self,
     user,
     view_perms,
     read_perms,
     post_perms,
     new_board_perms,
     view_group=[],
     read_group=[],
     post_group=[],
     new_board_group=[],
 ):
     self.view_perms, self.read_perms, self.post_perms, self.new_board_perms, self.view_group, self.read_group, self.post_group, self.new_board_group = (
         view_perms,
         read_perms,
         post_perms,
         new_board_perms,
         view_group,
         read_group,
         post_group,
         new_board_group,
     )
     self.password = "******"
     self.test_user = user
     TestCase.__init__(self)
Пример #2
0
    def __init__(self, *args, **kwargs):
        self.json_test_data = {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3",
            "list": [
                {
                    "subkey1": "subvalue1",
                    "subkey2": "subvalue2",
                    "subkey3": "subvalue3"
                },
                {
                    "subkey1": "subvalue1",
                    "subkey2": "subvalue2",
                    "subkey3": "subvalue3"
                },
                {
                    "subkey1": "subvalue1",
                    "subkey2": "subvalue2",
                    "subkey3": "subvalue3"
                }
            ]
        }

        TestCase.__init__(self, *args, **kwargs)
Пример #3
0
    def __init__(self, *args, **kwargs):
        TestCase.__init__(self)

        # _testMethodName is a name of a method to test by a test runner
        self._testMethodName = 'run_simulation'

        self.logger = SimulationLogger(path_pattern=self.log_path_pattern)
        self.prepare(*args, **kwargs)
Пример #4
0
    def __init__(self, *args, **kwargs):

        TestCase.__init__(self, *args, **kwargs)

        sample = os.path.join(
            settings.BASE_DIR, "interactions", "tests", "sample.mail")

        with open(sample, "rb") as f:
            self.sample = f.read()
Пример #5
0
    def __init__(self, *args, **kwargs):

        TestCase.__init__(self, *args, **kwargs)
        self.sample = os.path.join(
            settings.BASE_DIR,
            "documents",
            "tests",
            "samples",
            "inline_mail.txt"
        )
Пример #6
0
	def __init__(self, user, view_perms, read_perms, post_perms, new_thread_perms, view_group=[], read_group=[], post_group=[], new_thread_group=[]):
		self.view_perms, self.read_perms, self.post_perms, \
		self.new_thread_perms, self.view_group, self.read_group,\
		self.post_group, self.new_thread_group = view_perms, \
		read_perms, post_perms, new_thread_perms, \
		view_group, read_group, post_group, \
		new_thread_group
		self.password = '******'
		self.test_user = user
		TestCase.__init__(self)
Пример #7
0
    def __init__(self, *args, **kwargs):

        TestCase.__init__(self, *args, **kwargs)
        self.sample = os.path.join(
            settings.BASE_DIR,
            "documents",
            "tests",
            "samples",
            "mail.txt"
        )
Пример #8
0
    def __init__(self,
                 *args,
                 url,
                 arguments={
                     "network_code": "NET",
                     "network_start_year": "1990"
                 }):

        TestCase.__init__(self, *args)
        self.url = url
        self.net_stat = arguments
        self.username = "******"
        self.password = "******"
Пример #9
0
 def __init__(self, methodName='runTest'):
     TestCase.__init__(self, methodName=methodName)
     self.players = [
                     {'name': 'Alexandra Kosteniuk', 'rating': 2457, 'title': 8},
                     {'name': 'Alisa Galliamova', 'rating': 2484, 'title': 7},
                     {'name': 'Anna Muzychuk', 'rating': 2598, 'title': 8},
                     {'name': 'Antoaneta Stefanova', 'rating': 2518, 'title': 8},
                     {'name': 'Betul Cemre Yildiz', 'rating': 2333, 'title': 6},
                     {'name': 'Elina Danielian', 'rating': 2484, 'title': 8},
                     {'name': 'Hou Yifan', 'rating': 2623, 'title': 8},
                     {'name': 'Humpy Koneru', 'rating': 2589, 'title': 8},
                     {'name': 'Kateryna Lahno', 'rating': 2546, 'title': 8},
                     {'name': 'Nadezhda Kosintseva', 'rating': 2528, 'title': 8},
                     {'name': 'Tatiana Kosintseva', 'rating': 2532, 'title': 8},
                     {'name': 'Viktorija Cmilyte', 'rating': 2508, 'title': 8},
                    ]
     self.games = []
Пример #10
0
    def __init__(self, *args, **kwargs):

        # settings up HTTP authentification credentials

        try:
            username = settings.HTTP_TEST_USERNAME
            password = settings.HTTP_TEST_PASSWORD
        except AttributeError:
            raise Exception('You must define settings.HTTP_TEST_USERNAME '\
                            'and settings.HTTP_TEST_USERNAME to be able to '\
                            'test HTTP authentification')
        if not authenticate(username=username, password=password):
            raise Exception('settings.HTTP_TEST_USERNAME and '\
                            'settings.HTTP_TEST_PASSWORD are not valid '\
                            'credentials. Could not login.')

        auth = 'Basic %s' % base64.encodestring('%s:%s' % (username, password))
        self.auth = {'HTTP_AUTHORIZATION': auth.strip()}
        TestCase.__init__(self, *args, **kwargs)
Пример #11
0
 def __init__(self, *args, **kwargs):
 
     # settings up HTTP authentification credentials
     
     try:
         username = settings.HTTP_TEST_USERNAME
         password = settings.HTTP_TEST_PASSWORD
     except AttributeError:
         raise Exception('You must define settings.HTTP_TEST_USERNAME '\
                         'and settings.HTTP_TEST_USERNAME to be able to '\
                         'test HTTP authentification')
     if not authenticate(username=username, password=password):
         raise Exception('settings.HTTP_TEST_USERNAME and '\
                         'settings.HTTP_TEST_PASSWORD are not valid '\
                         'credentials. Could not login.')
     
     auth = 'Basic %s' % base64.encodestring('%s:%s' % (username, password))
     self.auth = {'HTTP_AUTHORIZATION': auth.strip()}
     TestCase.__init__(self, *args, **kwargs)
Пример #12
0
    def __init__(self, *args, **kwargs):
        self.json_test_data = {
            "key1":
            "value1",
            "key2":
            "value2",
            "key3":
            "value3",
            "list": [{
                "subkey1": "subvalue1",
                "subkey2": "subvalue2",
                "subkey3": "subvalue3"
            }, {
                "subkey1": "subvalue1",
                "subkey2": "subvalue2",
                "subkey3": "subvalue3"
            }, {
                "subkey1": "subvalue1",
                "subkey2": "subvalue2",
                "subkey3": "subvalue3"
            }]
        }

        TestCase.__init__(self, *args, **kwargs)
Пример #13
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.client = Client()
Пример #14
0
 def __init__(self, step_runner, step_registry, feature, scenario, feature_suite):
     FreshenTestCase.__init__(self, step_runner, step_registry,
                              feature, scenario, feature_suite)
     TestCase.__init__(self, scenario.name)
Пример #15
0
    def __init__(self):
        """TODO: to be defined1. """
        TestCase.__init__(self)

        c = client()
Пример #16
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.extra_components = [cls() for cls in self.extra_components]
Пример #17
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/topic.html')
Пример #18
0
 def __init__(self, methodName='runTest'):
     TestCase.__init__(self, methodName=methodName)
     setup_test_environment()
     self.client = Client()
Пример #19
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/users_page.html')
Пример #20
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/user_threads.html')
Пример #21
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/user_summary.html')
Пример #22
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/edit_post.html')
Пример #23
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/reply_form.html')
Пример #24
0
 def __init__(self, arg):
     TestCase.__init__(self, arg)
Пример #25
0
 def __init__(self, *args, **kwargs):
     if not os.path.exists(self.log_dir):
         os.makedirs(self.log_dir)
     TestCase.__init__(self, *args, **kwargs)
Пример #26
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.client = None
     self.project_id = 1
     self.project_path = "zS2NSxM9A4I0"
     self.model_id = 1
Пример #27
0
 def __init__(self, methodName):
     TestCase.__init__(self, methodName)
     self.xfer_class = None
Пример #28
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.t_engine = CalcTestEngine()
Пример #29
0
 def setUp(self):
     TestCase.__init__(self)
     self.base_url = 'https://sandbox.iexapis.com/stable/stock/market/list/mostactive?token=Tpk_c818732500c24764801eb121fa658bb6'
Пример #30
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.maxDiff = None
Пример #31
0
 def __init__(self, method_name='runTest'):
     TestCase.__init__(self, method_name)
     SharedTest.__init__(self, model[1])
Пример #32
0
 def __init__(self, iface):
     TestCase.__init__(self)
     self.app_thread = self.AppThread(iface)
Пример #33
0
 def __init__(self, methodName):
     TestCase.__init__(self, methodName)
     LucteriosTestAbstract.__init__(self)
Пример #34
0
 def __init__(self, arg):
     TestCase.__init__(self, arg)
     self.memoize_calls =  0
Пример #35
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     AsyncHTTPTestCase.__init__(self, *args, **kwargs)
Пример #36
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.user = '******'
Пример #37
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
Пример #38
0
    def __init__(self, *args, **kwargs):
        TestCase.__init__(self, *args, **kwargs)

        self.client = Client()
        self.url = reverse(twitter_news_view)
Пример #39
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     self.logger = logging.getLogger(
         "documents.management.commands.document_consumer")
Пример #40
0
 def __init__(self, *args, **kwargs):
     if not os.path.exists(self.log_dir):
         os.makedirs(self.log_dir)
     TestCase.__init__(self, *args, **kwargs)
Пример #41
0
 def __init__(self, methodName):
     TestCase.__init__(self, methodName)
     LucteriosTestAbstract.__init__(self)
Пример #42
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     AsyncHTTPTestCase.__init__(self, *args, **kwargs)
Пример #43
0
 def __init__(self, arg):
     TestCase.__init__(self, arg)
     self.calls =  0
Пример #44
0
 def __init__(self, arg):
     TestCase.__init__(self, arg)
     self.memoize_calls = 0
Пример #45
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
Пример #46
0
 def __init__(self, methodName='runTest', *args, **kwargs):
     self._origTestMethodName = getattr(self, methodName)
     AsyncTestCase.__init__(self, methodName='_run_test_method',  *args, **kwargs)
     DjangoTestCase.__init__(self, methodName='_run_test_method', *args, **kwargs)
Пример #47
0
	def __init__(self, *args, **kwargs):
		logging.disable(logging.ERROR)
		TestCase.__init__(self, *args, **kwargs)
Пример #48
0
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     TestCalls.__init__(self, 'djeddit/create_thread.html')