You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@aurora.apache.org by "Kevin Sweeney (JIRA)" <ji...@apache.org> on 2014/03/06 00:22:43 UTC

[jira] [Commented] (AURORA-248) Use Mock with specs in client tests

    [ https://issues.apache.org/jira/browse/AURORA-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13921607#comment-13921607 ] 

Kevin Sweeney commented on AURORA-248:
--------------------------------------

Surprised we don't already do this, but there's http://docs.python.org/dev/library/unittest.mock#auto-speccing

> Use Mock with specs in client tests
> -----------------------------------
>
>                 Key: AURORA-248
>                 URL: https://issues.apache.org/jira/browse/AURORA-248
>             Project: Aurora
>          Issue Type: Bug
>          Components: Client
>            Reporter: Maxim Khutornenko
>              Labels: newbie
>
> While investigating AURORA-247, figured out that none of our tests is capable of catching unknown options due to spec-less way options are mocked. Use Mock(spec=['option1', 'option2', ...]) instead of Mock() everywhere in client tests to prevent issues like AURORA-247. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)