def test_serialize_settings_for_user_no_auth(self): self.configure_responses() no_addon_user = AuthUserFactory() result = serialize_settings(self.node_settings, no_addon_user, client=figshare_mock) assert_false(result['userIsOwner']) assert_false(result['userHasAuth'])
def test_serialize_settings_helper_returns_correct_auth_info(self): self.configure_responses() result = serialize_settings(self.node_settings, self.user, client=figshare_mock) assert_equal(result['nodeHasAuth'], self.node_settings.has_auth) assert_true(result['userHasAuth']) assert_true(result['userIsOwner'])