'Custom hacky repr.
XBlock.Runtime.render() replaces the _view_name attribute while rendering, which
causes rendered comparisons of blocks to fail as unequal. So make the _view_name
attribute None during the base repr - and set it back to original value afterward.'

def __repr__(self):

    orig_view_name = None
    if hasattr(self, '_view_name'):
        orig_view_name = self._view_name
    self._view_name = None
    rt_repr = super(TestModuleSystem, self).__repr__()
    self._view_name = orig_view_name
    return rt_repr
