def test_retry_on_error_max_tries():
    # Namespace object constructed from top of tests (representing options)
    # toot and mastodon come from objects at top of test
    with pytest.raises(TimeoutError):
        mastodon = Mocktodon()
        toot = dict2obj(toot_dict)
        retry = ephemetoot.retry_on_error(Namespace(retry_mins=True), mastodon, toot, 7)
def test_retry_on_error():
    # Namespace object constructed from top of tests (representing options)
    # toot comes from variable at top of test
    mastodon = Mocktodon()
    toot = dict2obj(toot_dict)
    retry = ephemetoot.retry_on_error(Namespace(retry_mins=True), mastodon, toot, 5)
    assert retry == None  # should not return an error