예제 #1
0
 def test_finds_namespace_simple(self):
     cp = RuleLoader("test.yaml")
     self.assertEquals("test", cp._find_default_namespace())
예제 #2
0
    def test_parse_name_with_space(self):
        yaml = "#! foo \nbar:woo\n"
        cp = RuleLoader("test.yaml")

        self.assertEquals("test::foo", cp._get_key(yaml))
예제 #3
0
    def test_parse_without_name(self):
        yaml = "bar:woo\n"
        cp = RuleLoader("test.yaml")

        self.assertEquals("test::gen1", cp._get_key(yaml))
예제 #4
0
 def test_finds_namespace_withpath(self):
     cp = RuleLoader("foo/bar/test.yaml")
     self.assertEquals("test", cp._find_default_namespace())
     self.assertEquals("test", cp.namespace)
예제 #5
0
 def test_finds_namespace_simple(self):
     cp = RuleLoader("test.yaml")
     self.assertEquals("test", cp._find_default_namespace())
예제 #6
0
    def test_parse_without_name(self):
        yaml = "bar:woo\n"
        cp = RuleLoader("test.yaml")

        self.assertEquals("test::gen1", cp._get_key(yaml))
예제 #7
0
    def test_parse_name_with_space(self):
        yaml = "#! foo \nbar:woo\n"
        cp = RuleLoader("test.yaml")

        self.assertEquals("test::foo", cp._get_key(yaml))
예제 #8
0
 def test_finds_namespace_withpath(self):
     cp = RuleLoader("foo/bar/test.yaml")
     self.assertEquals("test", cp._find_default_namespace())
     self.assertEquals("test", cp.namespace)