def test_register_item_success(self): api_key = "SFUlqzam8" response = api_user.is_registered(self.test_alias, api_key, self.d) assert_equals(response, False) tiid = api_user.register_item(self.test_alias, api_key, self.r, self.d) response = api_user.is_registered(self.test_alias, api_key, self.d) assert_equals(response, True)
def test_register_item_success(self): existing_api_key = self.existing_api_user.api_key response = api_user.is_registered(self.test_alias, existing_api_key) assert_equals(response, False) response = api_user.register_item(self.test_alias, existing_api_key, self.r, self.d) assert_equals(response["registered_item"].alias, ('doi', '10.1371/journal.pcbi.1')) response = api_user.is_registered(self.test_alias, existing_api_key) assert_equals(response, True)
def test_is_registered(self): response = api_user.is_registered(self.test_alias, "NOT_VALID_KEY") assert_equals(response, False) response = api_user.is_registered(self.test_alias_registered, self.existing_api_user.api_key) assert_equals(response, True)
def test_is_registered(self): response = api_user.is_registered(self.test_alias, "SFUlqzam8", self.d) assert_equals(response, False) response = api_user.is_registered(self.test_alias_registered, "SFUlqzam8", self.d) assert_equals(response, True)