test: rename create_session_for to create_session_for_test_helper
To make it easier to see it's a test function when looking up callers/callees.
This commit is contained in:
@@ -1247,7 +1247,8 @@ mod tests {
|
||||
.with_transaction(|mut btr| async {
|
||||
let alice_account = atr.account().await?;
|
||||
let bob_account = btr.account().await?;
|
||||
let sessions = alice_account.create_session_for(bob_account).await;
|
||||
let sessions =
|
||||
alice_account.create_session_for_test_helper(bob_account).await;
|
||||
Ok((btr, sessions))
|
||||
})
|
||||
.await?;
|
||||
@@ -1845,7 +1846,7 @@ mod tests {
|
||||
.with_transaction(|mut tr| async {
|
||||
let alice_account = tr.account().await?;
|
||||
let (alice_session, _) =
|
||||
alice_account.create_session_for(&mut second_account).await;
|
||||
alice_account.create_session_for_test_helper(&mut second_account).await;
|
||||
Ok((tr, alice_session))
|
||||
})
|
||||
.await
|
||||
@@ -2068,7 +2069,8 @@ mod tests {
|
||||
.with_transaction(|mut btr| async {
|
||||
let alice_account = atr.account().await?;
|
||||
let bob_account = btr.account().await?;
|
||||
let sessions = alice_account.create_session_for(bob_account).await;
|
||||
let sessions =
|
||||
alice_account.create_session_for_test_helper(bob_account).await;
|
||||
Ok((btr, sessions))
|
||||
})
|
||||
.await?;
|
||||
|
||||
@@ -980,7 +980,10 @@ impl Account {
|
||||
#[cfg(any(test, feature = "testing"))]
|
||||
#[allow(dead_code)]
|
||||
/// Testing only helper to create a session for the given Account
|
||||
pub async fn create_session_for(&mut self, other: &mut Account) -> (Session, Session) {
|
||||
pub async fn create_session_for_test_helper(
|
||||
&mut self,
|
||||
other: &mut Account,
|
||||
) -> (Session, Session) {
|
||||
use ruma::events::dummy::ToDeviceDummyEventContent;
|
||||
|
||||
other.generate_one_time_keys_helper(1);
|
||||
|
||||
@@ -854,7 +854,7 @@ mod tests {
|
||||
.store
|
||||
.with_transaction(|mut tr| async {
|
||||
let manager_account = tr.account().await.unwrap();
|
||||
let res = bob.create_session_for(manager_account).await;
|
||||
let res = bob.create_session_for_test_helper(manager_account).await;
|
||||
Ok((tr, res))
|
||||
})
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user