from mock import Mock
import testify as T

import create_service


class SrvReaderWriterTestCase(T.TestCase):
    @T.setup
    def init_service(self):
        paths = create_service.paths.SrvPathBuilder("fake_srvpathbuilder")
        self.srw = create_service.SrvReaderWriter(paths)

    def test_append_raises_when_file_dne(self):
        self.srw._append()

class ValidateOptionsTestCase(T.TestCase):
    def test_enable_puppet_requires_puppet_root(self):
        parser = Mock()
        options = Mock()
        options.enable_puppet = True
        options.puppet_root = None
        with T.assert_raises(SystemExit):
            create_service.validate_options(parser, options)

    def test_enable_nagios_requires_nagios_root(self):
        parser = Mock()
        options = Mock()
        options.enable_nagios = True
        options.nagios_root = None
        with T.assert_raises(SystemExit):
            create_service.validate_options(parser, options)


if __name__ == "__main__":
    T.run()

@@ -99,24 +99,154 @@
 .TestCase):%0A
+    %22%22%22I bailed out of this test, but I'll leave this here for now as an%0A    example of how to interact with the Srv* classes.%22%22%22%0A
     @T.setup
@@ -411,84 +411,8 @@
 s)%0A%0A
-    def test_append_raises_when_file_dne(self):%0A        self.srw._append()%0A%0A
 clas

Remove an aborted test and add a docstring explaining why this test-less testcase is still here.