Merge pull request #5093 from GabrielInTheWorld/fixPythonTest

Fixes python3.7 tests
This commit is contained in:
Finn Stutzenstein 2019-10-29 15:24:16 +01:00 committed by GitHub
commit 98a7d4dcdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 9 deletions

View File

@ -22,8 +22,8 @@ def listen_to_related_object_post_save(sender, instance, created, **kwargs):
skip_autoupdate in the agenda_item_update_information container. skip_autoupdate in the agenda_item_update_information container.
""" """
instance_inform_changed_data = ( instance_inform_changed_data = (
False False # evaluates, if the related_object has to be send again.
) # evaluates, if the related_object has to be send again. )
# This is the case, if it was newly created and the autoupdate is not skipped with # This is the case, if it was newly created and the autoupdate is not skipped with
# agenda_item_skip_autoupdate or List_of_speakers_skip_autoupdate. If the related_object is # agenda_item_skip_autoupdate or List_of_speakers_skip_autoupdate. If the related_object is
# related to agenda items and list of speakers, the autoupdate is skipped, if one of the given # related to agenda items and list of speakers, the autoupdate is skipped, if one of the given

View File

@ -54,8 +54,8 @@ TEMPLATES = [
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_TIMEOUT = ( EMAIL_TIMEOUT = (
5 5 # Timeout in seconds for blocking operations like the connection attempt
) # Timeout in seconds for blocking operations like the connection attempt )
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/ # https://docs.djangoproject.com/en/1.10/topics/i18n/

View File

@ -308,7 +308,10 @@ class Motion(RESTModelMixin, AgendaItemWithListOfSpeakersMixin, models.Model):
# Identifier is already used. # Identifier is already used.
if hasattr(self, "_identifier_prefix"): if hasattr(self, "_identifier_prefix"):
# Calculate a new one and try again. # Calculate a new one and try again.
self.identifier_number, self.identifier = self.increment_identifier_number( (
self.identifier_number,
self.identifier,
) = self.increment_identifier_number(
self.identifier_number, self._identifier_prefix self.identifier_number, self._identifier_prefix
) )
else: else:

View File

@ -303,7 +303,10 @@ class ElementCache:
f"change_id {change_id} is lower then the lowest change_id in redis {lowest_change_id}." f"change_id {change_id} is lower then the lowest change_id in redis {lowest_change_id}."
) )
raw_changed_elements, deleted_elements = await self.cache_provider.get_data_since( (
raw_changed_elements,
deleted_elements,
) = await self.cache_provider.get_data_since(
change_id, max_change_id=max_change_id change_id, max_change_id=max_change_id
) )
changed_elements = { changed_elements = {

View File

@ -33,7 +33,7 @@ def register_projector_slide(name: str, slide: ProjectorSlide) -> None:
async def get_projector_data( async def get_projector_data(
projector_ids: List[int] = None projector_ids: List[int] = None,
) -> Dict[int, List[Dict[str, Any]]]: ) -> Dict[int, List[Dict[str, Any]]]:
""" """
Calculates and returns the data for one or all projectors. Calculates and returns the data for one or all projectors.

View File

@ -202,7 +202,7 @@ Saves all websocket client message object ordered by there identifier.
def register_client_message( def register_client_message(
websocket_client_message: BaseWebsocketClientMessage websocket_client_message: BaseWebsocketClientMessage,
) -> None: ) -> None:
""" """
Registers one websocket client message class. Registers one websocket client message class.

View File

@ -519,7 +519,7 @@ class RetrieveMotion(TestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_user_without_can_see_user_permission_to_see_motion_and_submitter_data( def test_user_without_can_see_user_permission_to_see_motion_and_submitter_data(
self self,
): ):
admin = get_user_model().objects.get(username="admin") admin = get_user_model().objects.get(username="admin")
Submitter.objects.add(admin, self.motion) Submitter.objects.add(admin, self.motion)