Public bug reported:

When running unit tests for heat-dashboard with Django 5, I get the
following unit test failure related to test settings imported from
horizon:

https://github.com/django/django/pull/15139

======================================================================
ERROR: test_index_exception 
(heat_dashboard.test.tests.content.test_template_versions.TemplateVersionsTests.test_index_exception)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
30, in import_string
    return cached_import(module_path, class_name)
  File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
16, in cached_import
    return getattr(module, class_name)
AttributeError: module 'django.contrib.sessions.serializers' has no attribute 
'PickleSerializer'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/heat_dashboard/test/helpers.py", line 132, in setUp
    super(TestCase, self).setUp()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/horizon/test/helpers.py", line 151, in 
setUp
    self._setup_request()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/<<PKGBUILDDIR>>/heat_dashboard/test/helpers.py", line 163, in 
_setup_request
    super(TestCase, self)._setup_request()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/horizon/test/helpers.py", line 172, in 
_setup_request
    self.request.session = self.client.session
                           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/test/client.py", line 811, in 
session
    session = engine.SessionStore()
  File 
"/usr/lib/python3/dist-packages/django/contrib/sessions/backends/base.py", line 
49, in __init__
    self.serializer = import_string(settings.SESSION_SERIALIZER)
                      ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
32, in import_string
    raise ImportError(
    ...<2 lines>...
    ) from err
ImportError: Module "django.contrib.sessions.serializers" does not define a 
"PickleSerializer" attribute/class

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/2120195

Title:
  Unit test failures with Django 5 -
  "django.contrib.sessions.serializers" does not define a
  "PickleSerializer" attribute/class

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  When running unit tests for heat-dashboard with Django 5, I get the
  following unit test failure related to test settings imported from
  horizon:

  https://github.com/django/django/pull/15139

  ======================================================================
  ERROR: test_index_exception 
(heat_dashboard.test.tests.content.test_template_versions.TemplateVersionsTests.test_index_exception)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
30, in import_string
      return cached_import(module_path, class_name)
    File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
16, in cached_import
      return getattr(module, class_name)
  AttributeError: module 'django.contrib.sessions.serializers' has no attribute 
'PickleSerializer'

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/heat_dashboard/test/helpers.py", line 132, in setUp
      super(TestCase, self).setUp()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3/dist-packages/horizon/test/helpers.py", line 151, in 
setUp
      self._setup_request()
      ~~~~~~~~~~~~~~~~~~~^^
    File "/<<PKGBUILDDIR>>/heat_dashboard/test/helpers.py", line 163, in 
_setup_request
      super(TestCase, self)._setup_request()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3/dist-packages/horizon/test/helpers.py", line 172, in 
_setup_request
      self.request.session = self.client.session
                             ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/django/test/client.py", line 811, in 
session
      session = engine.SessionStore()
    File 
"/usr/lib/python3/dist-packages/django/contrib/sessions/backends/base.py", line 
49, in __init__
      self.serializer = import_string(settings.SESSION_SERIALIZER)
                        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/django/utils/module_loading.py", line 
32, in import_string
      raise ImportError(
      ...<2 lines>...
      ) from err
  ImportError: Module "django.contrib.sessions.serializers" does not define a 
"PickleSerializer" attribute/class

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/2120195/+subscriptions


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to