mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 00:15:10 -04:00
Fix tests on postgresql (#3740)
This commit is contained in:
parent
567363e497
commit
77055dba92
18 changed files with 355 additions and 340 deletions
|
@ -12,9 +12,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.replication.slave.storage.account_data import SlavedAccountDataStore
|
||||
|
||||
from ._base import BaseSlavedStoreTestCase
|
||||
|
@ -27,16 +24,19 @@ class SlavedAccountDataStoreTestCase(BaseSlavedStoreTestCase):
|
|||
|
||||
STORE_TYPE = SlavedAccountDataStore
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def test_user_account_data(self):
|
||||
yield self.master_store.add_account_data_for_user(USER_ID, TYPE, {"a": 1})
|
||||
yield self.replicate()
|
||||
yield self.check(
|
||||
self.get_success(
|
||||
self.master_store.add_account_data_for_user(USER_ID, TYPE, {"a": 1})
|
||||
)
|
||||
self.replicate()
|
||||
self.check(
|
||||
"get_global_account_data_by_type_for_user", [TYPE, USER_ID], {"a": 1}
|
||||
)
|
||||
|
||||
yield self.master_store.add_account_data_for_user(USER_ID, TYPE, {"a": 2})
|
||||
yield self.replicate()
|
||||
yield self.check(
|
||||
self.get_success(
|
||||
self.master_store.add_account_data_for_user(USER_ID, TYPE, {"a": 2})
|
||||
)
|
||||
self.replicate()
|
||||
self.check(
|
||||
"get_global_account_data_by_type_for_user", [TYPE, USER_ID], {"a": 2}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue