Esempio n. 1
0
 def test_create_pass(self):
     t = Host(self.__salt__, **self.vars)
     t.mkconf = lambda: True
     t.mkdir = lambda x: True
     t.mklog = lambda x: True
     rv = t.create()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 2
0
 def test_create_fail(self):
     t = Host(self.__salt__, **self.vars)
     t.mkconf = Mock(side_effect=OSError)
     t.mkdir = Mock(side_effect=OSError)
     t.mklog = Mock(side_effect=OSError)
     rv = t.create()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 3
0
 def test_create_fail(self):
     t = Host(self.__salt__, **self.vars)
     t.mkconf = Mock(side_effect=OSError)
     t.mkdir = Mock(side_effect=OSError)
     t.mklog = Mock(side_effect=OSError)
     rv = t.create()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 4
0
 def test_create_pass(self):
     t = Host(self.__salt__, **self.vars)
     t.mkconf = lambda: True
     t.mkdir = lambda x: True
     t.mklog = lambda x: True
     rv = t.create()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 5
0
 def test_delete_true(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 6
0
def unsuspend(**kwargs):
    ret = Host(__salt__, **kwargs)
    return ret.unsuspend()
Esempio n. 7
0
 def test_mklog_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mklog('/tmp/')
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 8
0
 def test_mkconf_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mkconf()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 9
0
 def test_mklog_pass(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mklog('/tmp/')
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 10
0
 def test_mkconf_pass(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mkconf()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 11
0
 def test_delete_true(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 12
0
 def test_mkconf_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mkconf()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 13
0
 def test_unsuspend_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.unsuspend()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 14
0
 def test_mklog_pass(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mklog('/tmp/')
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 15
0
 def test_mksource_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mksource('/tmp/')
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 16
0
 def test_mkconf_pass(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mkconf()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 17
0
 def test_unsuspend_true(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.unsuspend()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 18
0
 def test_unsuspend_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.unsuspend()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 19
0
 def test_delete_user(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete(user=True)
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 20
0
 def test_mksource_fail(self):
     t = Host(self.__salt__, **self.vars)
     t.mksource('/tmp/')
Esempio n. 21
0
 def test_unsuspend_true(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.unsuspend()
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 22
0
 def test_mkdir_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mkdir('/tmp/')
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 23
0
 def test_mksource_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.mksource('/tmp/')
     ok_(rv is True, 'returned %s' % rv)
Esempio n. 24
0
def delete(**kwargs):
    ret = Host(__salt__, **kwargs)
    return ret.delete(user=False)
Esempio n. 25
0
def unsuspend(**kwargs):
    ret = Host(__salt__, **kwargs)
    return ret.unsuspend()
Esempio n. 26
0
def create(**kwargs):
    ret = Host(__salt__,**kwargs)
    return ret.create()
Esempio n. 27
0
 def test_mksource_fail(self):
     t = Host(self.__salt__, **self.vars)
     t.mksource('/tmp/')
Esempio n. 28
0
 def test_delete_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 29
0
def delete(**kwargs):
    ret = Host(__salt__, **kwargs)
    return ret.delete(user=False)
Esempio n. 30
0
 def test_delete_fail(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete()
     ok_(rv is False, 'returned %s' % rv)
Esempio n. 31
0
def create(**kwargs):
    ret = Host(__salt__, **kwargs)
    return ret.create()
Esempio n. 32
0
 def test_delete_user(self):
     t = Host(self.__salt__, **self.vars)
     rv = t.delete(user=True)
     ok_(rv is False, 'returned %s' % rv)