def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Assignment.objects.create(title='motion{}'.format(index), open_posts=1)
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() user = User.objects.get(pk=1) for index in range(10): ChatMessage.objects.create(user=user)
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() user = User.objects.get(pk=1) for index in range(10): ChatMessage.objects.create(user=user)
def setUp(self): # Save the old value of the config object and add the test values # TODO: Can be changed to setUpClass when Django 1.8 is no longer supported self._config_values = config.config_variables.copy() config.key_to_id = {} config.update_config_variables(set_simple_config_view_integration_config_test()) config.save_default_values()
def setUp(self): # Save the old value of the config object and add the test values # TODO: Can be changed to setUpClass when Django 1.8 is no longer supported self._config_values = config.config_variables.copy() config.key_to_id = None config.update_config_variables(set_simple_config_view_integration_config_test()) config.save_default_values()
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Motion.objects.create(title='motion{}'.format(index)) get_user_model().objects.create_user( username='******'.format(index), password='******')
def test_config_db_queries(): """ Tests that only the following db queries are done: * 1 requests to get the list of all config values """ config.save_default_values() assert count_queries(Tag.get_elements)() == 1
def test_config_db_queries(): """ Tests that only the following db queries are done: * 1 requests to get the list of all config values """ config.save_default_values() assert count_queries(Tag.get_elements) == 1
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Mediafile.objects.create(title='some_file{}'.format(index), mediafile=SimpleUploadedFile( 'some_file{}'.format(index), b'some content.'))
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Mediafile.objects.create( title='some_file{}'.format(index), mediafile=SimpleUploadedFile( 'some_file{}'.format(index), b'some content.'))
def setUp(self): # Save the old value of the config object and add the test values # TODO: Can be changed to setUpClass when Django 1.8 is no longer supported self._config_values = config.config_variables.copy() config.update_config_variables(set_grouped_config_view()) config.update_config_variables(set_simple_config_view()) config.update_config_variables(set_simple_config_view_multiple_vars()) config.update_config_variables(set_simple_config_collection_disabled_view()) config.update_config_variables(set_simple_config_collection_with_callback()) config.save_default_values()
def setUp(self): # Save the old value of the config object and add the test values # TODO: Can be changed to setUpClass when Django 1.8 is no longer supported self._config_values = config.config_variables.copy() config.update_config_variables(set_grouped_config_view()) config.update_config_variables(set_simple_config_view()) config.update_config_variables(set_simple_config_view_multiple_vars()) config.update_config_variables(set_simple_config_collection_disabled_view()) config.update_config_variables(set_simple_config_collection_with_callback()) config.save_default_values()
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Group.objects.create(name='group{}'.format(index))
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values()
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): User.objects.create(username='******'.format(index))
def setUp(self): self.client = APIClient() config.save_default_values() config['general_system_enable_anonymous'] = True
def setUp(self): self.client = APIClient() config['general_system_enable_anonymous'] = True config.save_default_values() for index in range(10): Topic.objects.create(title='topic-{}'.format(index))