Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2345

Fix test_site_update_url()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: NoFixVersionApplicable
    • Fix Version/s: 4.5.0
    • Component/s: Tests

      Description

      Directory listing has been disabled with NCI-129, let's adapt our test to use a known file instead of the root:

           def test_site_update_url():
              with requests.get(Options.update_site_url) as resp:
      >           resp.raise_for_status()
      
      resp       = <Response [403]>
      
      tests/unit/test_options.py:252: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      self = <Response [403]>
      
          def raise_for_status(self):
              """Raises :class:`HTTPError`, if one occurred."""
          
              http_error_msg = ''
              if isinstance(self.reason, bytes):
                  # We attempt to decode utf-8 first because some servers
                  # choose to localize their reason strings. If the string
                  # isn't utf-8, we fall back to iso-8859-1 for all other
                  # encodings. (See PR #3538)
                  try:
                      reason = self.reason.decode('utf-8')
                  except UnicodeDecodeError:
                      reason = self.reason.decode('iso-8859-1')
              else:
                  reason = self.reason
          
              if 400 <= self.status_code < 500:
                  http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url)
          
              elif 500 <= self.status_code < 600:
                  http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)
          
              if http_error_msg:
      >           raise HTTPError(http_error_msg, response=self)
      E           requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://community.nuxeo.com:443/static/drive-updates/
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.