Fix some test failures when frozen_dicts are enabled (#6642)

Fixes #4026
This commit is contained in:
Richard van der Hoff 2020-01-06 15:22:46 +00:00 committed by GitHub
parent 9f6c1befbb
commit ba897a7590
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 11 deletions

View file

@ -12,7 +12,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.
import collections.abc
import logging
from collections import namedtuple
from typing import Iterable, Tuple
@ -107,7 +107,7 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
predecessor = create_event.content.get("predecessor", None)
# Ensure the key is a dictionary
if not isinstance(predecessor, dict):
if not isinstance(predecessor, collections.abc.Mapping):
return None
return predecessor