This behaviour has changed in Python 3.5 [1], and it was also backported to the mock package.
When unsafe=False (the default), accessing an attribute that begins with assert will raise an error.
[1]: https://docs.python.org/3/library/unittest.mock.html#the-moc...