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

Updated test.py for assessing Item.time #2

Closed
wants to merge 1 commit into from

Conversation

chaconnewu
Copy link
Contributor

Making sure it will not raise an exception when Item.time is assessed.

Making sure it will not raise an exception when Item.time is assessed.
@abrinsmead
Copy link
Owner

This test is ok the way it is because either Item(1) has a time attribute or, if it doesn't, your fix prevents any problems. :)

What I was looking for is a test that proves that an item that is known to be without a time attribute does not cause an error. I would do something like this...

def test_item_without_time_attribute_can_be_created:
    item_id_without_time = 9999999  # need to find an actual item without time attribute
    item = self.hn.item(item_id_without_time)
    self.assertIsInstance(item, Item)

Thanks for your help!

@abrinsmead abrinsmead closed this Nov 5, 2014
@chaconnewu
Copy link
Contributor Author

No problem! Do you have any other plan with this project?

On Tue, Nov 4, 2014 at 11:03 PM, Alex Brinsmead notifications@github.com
wrote:

This test is ok the way it is because either Item(1) has a time attribute
or, if it doesn't, your fix prevents any problems. :)

What I was looking for is a test that proves that an item that is known to
be without a time attribute does not cause an error. I would do something
like this...

def test_item_without_time_attribute_can_be_created:
item_id_without_time = 9999999 # need to find an actual item without time attribute
item = self.hn.item(item_id_without_time)
self.assertIsInstance(item, Item)

Thanks for your help!


Reply to this email directly or view it on GitHub
#2 (comment)
.

Wu Yu

@abrinsmead
Copy link
Owner

There is not much more to do until the next version of the Hacker News API is released.

But I do have some other open source and paid projects that you might be interested in. Please send me an email to alex.brinsmead@dataloft.com. Thanks!

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.

None yet

2 participants