Exemplo n.º 1
0
 def when_no_arg_or_kwarg_given(self):
     g = Group("host1", "host2")
     g._do = Mock()
     g.get(remote="whatever")
     g._do.assert_called_with("get",
                              remote="whatever",
                              local="{host}/")
Exemplo n.º 2
0
 def not_when_arg_given(self):
     g = Group("host1", "host2")
     g._do = Mock()
     g.get("whatever", "lol")
     # No local kwarg passed.
     g._do.assert_called_with("get", "whatever", "lol")
Exemplo n.º 3
0
 def not_when_kwarg_given(self):
     g = Group("host1", "host2")
     g._do = Mock()
     g.get(remote="whatever", local="lol")
     # Doesn't stomp given local arg
     g._do.assert_called_with("get", remote="whatever", local="lol")