diff options
author | Shay <hillerys@element.io> | 2023-06-02 17:24:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 17:24:13 -0700 |
commit | d0c4257f14addbf0c9072c2e34ae1c8294716ed5 (patch) | |
tree | ae70970e9e40512739c4df0927d25d0649602743 /tests/storage/test_profile.py | |
parent | Add a catch-all * to the supported relation types when redacting (#15705) (diff) | |
download | synapse-d0c4257f14addbf0c9072c2e34ae1c8294716ed5.tar.xz |
`N + 3`: Read from column `full_user_id` rather than `user_id` of tables `profiles` and `user_filters` (#15649)
Diffstat (limited to 'tests/storage/test_profile.py')
-rw-r--r-- | tests/storage/test_profile.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py index f9cf0fcb82..fe5bb77913 100644 --- a/tests/storage/test_profile.py +++ b/tests/storage/test_profile.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from twisted.test.proto_helpers import MemoryReactor from synapse.server import HomeServer @@ -35,18 +36,14 @@ class ProfileStoreTestCase(unittest.HomeserverTestCase): self.assertEqual( "Frank", - ( - self.get_success( - self.store.get_profile_displayname(self.u_frank.localpart) - ) - ), + (self.get_success(self.store.get_profile_displayname(self.u_frank))), ) # test set to None self.get_success(self.store.set_profile_displayname(self.u_frank, None)) self.assertIsNone( - self.get_success(self.store.get_profile_displayname(self.u_frank.localpart)) + self.get_success(self.store.get_profile_displayname(self.u_frank)) ) def test_avatar_url(self) -> None: @@ -58,18 +55,14 @@ class ProfileStoreTestCase(unittest.HomeserverTestCase): self.assertEqual( "http://my.site/here", - ( - self.get_success( - self.store.get_profile_avatar_url(self.u_frank.localpart) - ) - ), + (self.get_success(self.store.get_profile_avatar_url(self.u_frank))), ) # test set to None self.get_success(self.store.set_profile_avatar_url(self.u_frank, None)) self.assertIsNone( - self.get_success(self.store.get_profile_avatar_url(self.u_frank.localpart)) + self.get_success(self.store.get_profile_avatar_url(self.u_frank)) ) def test_profiles_bg_migration(self) -> None: |