Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

############################################################################### 

# (c) Copyright 2016 CERN # 

# # 

# This software is distributed under the terms of the GNU General Public # 

# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # 

# # 

# In applying this licence, CERN does not waive the privileges and immunities # 

# granted to it by virtue of its status as an Intergovernmental Organization # 

# or submit itself to any jurisdiction. # 

############################################################################### 

''' 

@author: Stefan-Gabriel CHITIC 

''' 

 

import unittest 

 

from lbCVMFSTools.TaskHandlerInterface import TaskHandlerInterface 

 

 

class TestTaskHandlerInterface(unittest.TestCase): 

 

def setUp(self): 

self.obj = TaskHandlerInterface() 

 

def tearDown(self): 

pass 

 

def test_dry_run_mode(self): 

self.assertFalse(self.obj.dry_run) 

self.obj = TaskHandlerInterface(dry_run=True) 

self.assertTrue(self.obj.dry_run) 

 

def test_preTransaction(self): 

self.assertRaises(NotImplementedError, self.obj.preTransaction) 

 

def test_postTransaction(self): 

self.assertRaises(NotImplementedError, self.obj.postTransaction) 

 

def test_get_list_of_tasks(self): 

self.assertRaises(NotImplementedError, self.obj.get_list_of_tasks) 

 

def test_perform_task(self): 

self.assertRaises(NotImplementedError, 

self.obj.perform_task, None) 

 

def test_configure(self): 

self.assertRaises(NotImplementedError, 

self.obj.configure) 

 

if __name__ == "__main__": 

 

unittest.main()