Uploaded image for project: 'openATTIC'
  1. openATTIC
  2. OP-2526

Failing python-unit tests: "AttributeError: 'NoneType' object has no attribute 'cluster'"

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.2
    • Fix Version/s: 3.4.2
    • Component/s: QA/Testing
    • Labels:
    • Sprint:
      Sprint 27

      Description

      ======================================================================
      ERROR: test_minimum_valid_pools (ceph.tests.CephPoolSerializerTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/usr/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
          return func(*args, **keywargs)
        File "/srv/openattic/backend/ceph/tests.py", line 418, in test_minimum_valid_pools
          self.assertTrue(s.is_valid(), 'pool={} errors={}'.format(pool, s.errors))
        File "/usr/lib/python2.7/site-packages/rest_framework/serializers.py", line 554, in is_valid
          return not self.errors
        File "/usr/lib/python2.7/site-packages/rest_framework/serializers.py", line 546, in errors
          ret = self.from_native(data, files)
        File "/usr/lib/python2.7/site-packages/rest_framework/serializers.py", line 1025, in from_native
          instance = super(ModelSerializer, self).from_native(data, files)
        File "/usr/lib/python2.7/site-packages/rest_framework/serializers.py", line 379, in from_native
          return self.restore_object(attrs, instance=getattr(self, 'object', None))
        File "/usr/lib/python2.7/site-packages/rest_framework/serializers.py", line 1003, in restore_object
          instance = self.opts.model()
        File "/srv/openattic/backend/ceph/models.py", line 336, in __init__
          self.cluster = CephPool.objects.nodb_context.cluster
      AttributeError: 'NoneType' object has no attribute 'cluster'
      

        Attachments

          Activity

            People

            Assignee:
            rdias Ricardo Dias
            Reporter:
            lpaduano Paduano, Laura
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: