Skip to content

Commit

Permalink
Rename get_entity_user_exists() -> get_entity_user_regular().
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Mar 7, 2024
1 parent 9821895 commit aab0bc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/test_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
find_element,
get_entity_date,
get_entity_user,
get_entity_user_exists,
get_entity_user_regular,
make_soup,
regex_extract,
regex_extract_int,
Expand Down Expand Up @@ -105,10 +105,10 @@ def test_regular_user(self):
self.assertEqual(user.slug, "aismallard")
self.assertEqual(user.name, "aismallard")

# Also test that get_entity_user_exists() returns the same thing
# Also test that get_entity_user_regular() returns the same thing
# (though this function is not normally used directly)
entity2 = entity.find("a")
user2 = get_entity_user_exists(TEST_SOURCE, entity2)
user2 = get_entity_user_regular(TEST_SOURCE, entity2)
self.assertEqual(user, user2)

def test_deleted_user(self):
Expand Down
4 changes: 2 additions & 2 deletions yellowstone/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def get_entity_user(source: str, tag: Tag) -> ForumPostUser:
return CustomUserData(guest_name)

# Regular users
return get_entity_user_exists(source, entity)
return get_entity_user_regular(source, entity)

# Created by Wikidot
if tag.text.strip() == "Wikidot":
Expand All @@ -146,7 +146,7 @@ def get_entity_user(source: str, tag: Tag) -> ForumPostUser:
raise ScrapingError(f"Cannot determine user data from {source}")


def get_entity_user_exists(
def get_entity_user_regular(
source: str,
tag: Tag,
) -> UserModuleData:
Expand Down

0 comments on commit aab0bc4

Please sign in to comment.