Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AttributeError in MetaInfo class #690

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

JureBl
Copy link

@JureBl JureBl commented Oct 24, 2023

What GitHub issue does this PR apply to?

BUG: Go's queues/stacks fails #689

What changed and why?

Fix AttributeError in MetaInfo class

Replace incorrect 'self.language_friendly_name(language_key)' with 'self.language_name(language_key)' in the load_languages method of the MetaInfo class.

(If editing Django app) Please add screenshots

Checklist

  • I claimed any associated issue(s) and they are not someone else's
  • I have looked at documentation to ensure I made any revisions correctly
  • I tested my changes locally to ensure they work
  • (If editing Django) I have added or edited any appropriate unit tests for my changes

Any additional comments or things to be aware of while reviewing?

@geekygirlsarah geekygirlsarah temporarily deployed to codethesaurus-test-pr-690 October 24, 2023 16:35 Inactive
@geekygirlsarah
Copy link
Member

I made the review app https://codethesaurus-test-pr-690.herokuapp.com . Go's queues/stacks aren't listed. Are there other good ways to test this?

Also could unit tests be added to this somehow to verify it's proper working order?

@JureBl
Copy link
Author

JureBl commented Oct 24, 2023

    def test_language_bad_key_and_lang_exists(self):
        """test Language behaviour with bad language key"""
        language = self.dummy_language

        self.assertEqual(bool(language), False)
        self.assertRaises(FileNotFoundError,
                          language.load_concepts,  "notastructure", "notaversion")

I think that is already testing a language that is not listed. Or for what case do you need a Unit-test? Also I am not very familiar with Unit-tests :)

@geekygirlsarah
Copy link
Member

Yeah, but the test apparently didn't check something because we were getting 500 server errors. If you're not familiar with them, maybe I'll see if I can add a test soon.

I'll go ahead and merge this in.

@geekygirlsarah geekygirlsarah merged commit c4b4f97 into codethesaurus:main Oct 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants