From 7e3388dd9eeaf2ec842656084b518354bbd25468 Mon Sep 17 00:00:00 2001 From: Alya Abbott Date: Tue, 12 Jul 2022 23:21:48 -0700 Subject: [PATCH] images: Move /team images into landing-page directory. --- static/images/{ => landing-page}/team/tim.png | Bin templates/zerver/team.html | 2 +- zerver/lib/dev_ldap_directory.py | 2 +- zerver/tests/fixtures/ldap/directory.json | 4 ++-- zerver/tests/test_auth_backends.py | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) rename static/images/{ => landing-page}/team/tim.png (100%) diff --git a/static/images/team/tim.png b/static/images/landing-page/team/tim.png similarity index 100% rename from static/images/team/tim.png rename to static/images/landing-page/team/tim.png diff --git a/templates/zerver/team.html b/templates/zerver/team.html index 7abe52a29f..82530d3a2c 100644 --- a/templates/zerver/team.html +++ b/templates/zerver/team.html @@ -34,7 +34,7 @@
- +
Tim Abbott
diff --git a/zerver/lib/dev_ldap_directory.py b/zerver/lib/dev_ldap_directory.py index 124e3e16bb..cf5bbcbcd8 100644 --- a/zerver/lib/dev_ldap_directory.py +++ b/zerver/lib/dev_ldap_directory.py @@ -24,7 +24,7 @@ def generate_dev_ldap_dir(mode: str, num_users: int = 8) -> Dict[str, Dict[str, ldap_data.append((name, email, phone_number, birthdate)) profile_images = [] - for path in glob.glob(os.path.join(static_path("images/team"), "*")): + for path in glob.glob(os.path.join(static_path("images/landing-page/team"), "*")): with open(path, "rb") as f: profile_images.append(f.read()) ldap_dir = {} diff --git a/zerver/tests/fixtures/ldap/directory.json b/zerver/tests/fixtures/ldap/directory.json index bf1d5f387e..1cc0767bf8 100644 --- a/zerver/tests/fixtures/ldap/directory.json +++ b/zerver/tests/fixtures/ldap/directory.json @@ -13,7 +13,7 @@ "sn": ["Hamlet"], "homePhone": ["123456789"], "birthDate": ["1900-09-08"], - "jpegPhoto": "file:static/images/team/tim.png" + "jpegPhoto": "file:static/images/landing-page/team/tim.png" }, "uid=cordelia,ou=users,dc=zulip,dc=com": { @@ -38,7 +38,7 @@ "uid": ["newuser"], "sn": ["shortname"], "homePhone": ["a-new-number"], - "jpegPhoto": "file:static/images/team/tim.png" + "jpegPhoto": "file:static/images/landing-page/team/tim.png" }, "uid=newuser_splitname,ou=users,dc=zulip,dc=com": { diff --git a/zerver/tests/test_auth_backends.py b/zerver/tests/test_auth_backends.py index 4e2a2252b6..6025c4f27a 100644 --- a/zerver/tests/test_auth_backends.py +++ b/zerver/tests/test_auth_backends.py @@ -6047,7 +6047,9 @@ class TestLDAP(ZulipLDAPTestCase): assert url is not None response = self.client_get(url) self.assertEqual(response.status_code, 200) - with open(os.path.join(settings.DEPLOY_ROOT, "static/images/team/tim.png"), "rb") as f: + with open( + os.path.join(settings.DEPLOY_ROOT, "static/images/landing-page/team/tim.png"), "rb" + ) as f: tim = f.read() self.assert_streaming_content(response, resize_avatar(tim, DEFAULT_AVATAR_SIZE))