'Test that unlocked assets that are versioned, but have a nonexistent version,
are sent back as a 301 redirect which tells the caller the correct URL.'

def test_unlocked_versioned_asset_with_nonexistent_version(self):

    url_unlocked_versioned_old = StaticContent.add_version_to_asset_path(self.url_unlocked, FAKE_MD5_HASH)
    self.client.logout()
    resp = self.client.get(url_unlocked_versioned_old)
    self.assertEqual(resp.status_code, 301)
    self.assertTrue(resp.url.endswith(self.url_unlocked_versioned))
