~bryce/arsenal/lpltk-filtered-attachments

« back to all changes in this revision

Viewing changes to tests/TestBug.py

Merge Brad's rework of the lpltk base classes

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import unittest
5
5
import os
6
6
 
7
 
class TestLpltkBug(unittest.TestCase):
 
7
class TestBug(unittest.TestCase):
8
8
 
9
9
    # setUp
10
10
    #
34
34
            bug   = ls.get_bug(3)
35
35
            title = bug.title
36
36
            self.assertEqual(title, 'Custom information for each translation team')
37
 
        except:
38
 
            self.assertTrue(False)
39
37
        finally:
40
38
            bug = None
41
39
            ls  = None
47
45
            ls    = LaunchpadService(self.configuration)
48
46
            bug   = ls.get_bug(3)
49
47
            original_title = bug.title
50
 
            bug.title = "Testing LptBug.title property"
51
 
            self.assertEqual(bug.title, 'Testing LptBug.title property')
 
48
            bug.title = "Testing Bug.title property"
 
49
            self.assertEqual(bug.title, 'Testing Bug.title property')
52
50
            bug.title = original_title
53
51
            self.assertEqual(bug.title, original_title)
54
 
        except:
55
 
            self.assertTrue(False)
56
52
        finally:
57
53
            bug = None
58
54
            ls  = None
66
62
            description = bug.description
67
63
            if "It would be nice if we could easily add *MUST READ* type of links" not in description:
68
64
                self.assertTrue(False)
69
 
        except:
70
 
            self.assertTrue(False)
71
65
        finally:
72
66
            bug = None
73
67
            ls  = None
79
73
            ls    = LaunchpadService(self.configuration)
80
74
            bug   = ls.get_bug(3)
81
75
            original_description = bug.description
82
 
            bug.description = "Testing LptBug.title property"
83
 
            self.assertEqual(bug.description, 'Testing LptBug.title property')
 
76
            bug.description = "Testing Bug.title property"
 
77
            self.assertEqual(bug.description, 'Testing Bug.title property')
84
78
            bug.description = original_description
85
79
            self.assertEqual(bug.description, original_description)
86
 
        except:
87
 
            self.assertTrue(False)
88
80
        finally:
89
81
            bug = None
90
82
            ls  = None