def test_leaves_group(self, groups_service, pyramid_config, pyramid_request): group = FakeGroup('abc123', 'some-slug') pyramid_config.testing_securitypolicy('marcela') views.leave(group, pyramid_request) assert (group, 'marcela') in groups_service.left
def test_leaves_group(self, group_service, pyramid_config, pyramid_request): group = FakeGroup('abc123', 'some-slug') pyramid_config.testing_securitypolicy('marcela') views.leave(group, pyramid_request) assert (group, 'marcela') in group_service.left
def test_returns_nocontent(self, pyramid_request): group = FakeGroup('abc123', 'some-slug') result = views.leave(group, pyramid_request) assert isinstance(result, HTTPNoContent)