示例#1
0
class SetAddressCommandTest(TestCase):
    def setUp(self):
        self.command = SetAddressCommand()

    def test_invoke_should_call_set_email_address_on_session(self):
        mock_session = Mock()
        mock_args = Mock(address='john91')
        self.command.invoke(mock_session, mock_args)
        mock_session.set_email_address.assert_called_with('john91')

    def test_invoke_should_have_no_output(self):
        mock_session = Mock()
        mock_args = Mock(address='john91')
        output = self.command.invoke(mock_session, mock_args)
        expect(output).to.be.none
示例#2
0
class SetAddressCommandTest(TestCase):
    def setUp(self):
        self.command = SetAddressCommand()

    def test_invoke_should_call_set_email_address_on_session(self):
        mock_session = Mock()
        mock_args = Mock(address='john91')
        self.command.invoke(mock_session, mock_args)
        mock_session.set_email_address.assert_called_with('john91')

    def test_invoke_should_have_no_output(self):
        mock_session = Mock()
        mock_args = Mock(address='john91')
        output = self.command.invoke(mock_session, mock_args)
        expect(output).to.be.none
示例#3
0
 def setUp(self):
     self.command = SetAddressCommand()
示例#4
0
 def setUp(self):
     self.command = SetAddressCommand()