Beispiel #1
0
    def test_get_conn(self, get_conn_mock):
        get_conn_mock.return_value = connection
        hook = SambaHook('samba_default')

        self.assertEqual(smbclient.SambaClient, type(hook.get_conn()))
        get_conn_mock.assert_called_once_with('samba_default')
Beispiel #2
0
    def test_get_conn(self, get_conn_mock):
        get_conn_mock.return_value = connection
        hook = SambaHook('samba_default')

        assert isinstance(hook.get_conn(), smbclient.SambaClient)
        get_conn_mock.assert_called_once_with('samba_default')