コード例 #1
0
ファイル: tests.py プロジェクト: flynhigher/terry-play-ground
 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
ファイル: tests.py プロジェクト: c17r/tsace
    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
ファイル: simulation.py プロジェクト: thanhtd91/flocs
    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
ファイル: test_mail.py プロジェクト: XanderDwyl/paperless
    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
ファイル: base_classes.py プロジェクト: EIDA/stationbook
    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
ファイル: http_api.py プロジェクト: mangroveorg/georegistry
    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
ファイル: http_api.py プロジェクト: flowersw/georegistry
 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
ファイル: tests.py プロジェクト: c17r/tsace
    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
ファイル: djangounit.py プロジェクト: taiste/freshen
 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
ファイル: test_utils.py プロジェクト: DevangS/CoralNet
 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
ファイル: tests.py プロジェクト: nandigama/insights
 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
ファイル: test_model.py プロジェクト: vincent-noel/WebMaBoSS
 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
ファイル: test.py プロジェクト: povtux/core
 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
ファイル: test.py プロジェクト: mayjo79/core
 def __init__(self, methodName):
     TestCase.__init__(self, methodName)
     LucteriosTestAbstract.__init__(self)
コード例 #34
0
ファイル: tests.py プロジェクト: AgentK1729/insights
 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
ファイル: test_importer.py プロジェクト: Djailla/paperless
 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
ファイル: test_logger.py プロジェクト: zeroset/paperless
 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
ファイル: test.py プロジェクト: Lucterios2/core
 def __init__(self, methodName):
     TestCase.__init__(self, methodName)
     LucteriosTestAbstract.__init__(self)
コード例 #42
0
ファイル: tests.py プロジェクト: MechanisM/django-signalqueue
 def __init__(self, *args, **kwargs):
     TestCase.__init__(self, *args, **kwargs)
     AsyncHTTPTestCase.__init__(self, *args, **kwargs)
コード例 #43
0
ファイル: tests.py プロジェクト: avontd2868/ed-insights
 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
ファイル: tests.py プロジェクト: cygnusb/trainingslog
	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')