mattlisiv / newsapi-python

A Python Client for News API
MIT License
376 stars 130 forks source link

Correct Error Message and Add Unit Tests #19

Closed TobiAlbert closed 5 years ago

TobiAlbert commented 5 years ago

I understand the pytest module has been added, and you expect tests to be written using it but I just couldn't get it to work.

I don't know what the issue is, but I noticed that I can't pass a decorated '@pytest.fixture' function as a parameter into another function.

ie

@pytest.fixture def foo(): return Object()

def test_bar(foo): foo.do_something()

mattlisiv commented 5 years ago

Hi @TobiAlbert ,

Thanks for the tests! Very helpful. However, I would ask that you revert the changes to newsapi_client.py that change the TypeError message. It could be confusing to change the coment from 'str' to 'string', because 'str' and 'string' are two seperate modules in Python.

After that is resolved, I will merge.

Best, Matt

TobiAlbert commented 5 years ago

Hi @mattlisiv,

I've reverted the changes to newsapi_client.py.

Thanks, Tobi.

mattlisiv commented 5 years ago

Awesome, thanks @TobiAlbert. Merged.