| Total Complexity | 3 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| 1 | import unittest |
||
| 11 | class BuildDbusServiceTest(unittest.TestCase): |
||
| 12 | |||
| 13 | def test_build(self): |
||
| 14 | dist = Distribution() |
||
| 15 | uut = BuildDbusService(dist) |
||
| 16 | self.assertRaises(DistutilsOptionError, uut.finalize_options) |
||
| 17 | with make_temp() as uut.output: |
||
| 18 | uut.finalize_options() |
||
| 19 | |||
| 20 | uut.run() |
||
| 21 | with open(uut.output) as file: |
||
| 22 | result = file.read(1000) |
||
| 23 | |||
| 24 | self.assertEqual( |
||
| 25 | result, |
||
| 26 | "[D-BUS Service]\nNames=" + Constants.BUS_NAME + |
||
| 27 | "\nExec=coala-dbus") |
||
| 28 |