示例#1
0
    def test_knowntypes(self):
        uniargs = [u"testmmąöî"]
        # The table is sent to output using logger.output()
        capturer = Capturer(self.logger)
        dgm_cli.knowntypes(self.db, self.config, uniargs)
        data = capturer.getCaptured().decode('utf-8')

        val = compare_to_ref("test_knowntypes", "table")
        assert data == val
示例#2
0
    def test_graphrules_nofile(self):
        uniargs = [u"testmmąöî"]
        # The graph is sent to output using logger.output()
        capturer = Capturer(self.logger)
        dgm_cli.graphrules(self.db, self.config, uniargs)
        data = capturer.getCaptured().decode('utf-8')

        val = compare_to_ref("test_graphrules_nofile", "graph")
        assert data == val
示例#3
0
    def test_graphrules_nofile_2rules(self):
        # Add a rule that depends on the one in the test file (mmąöî)
        uniargs_add = [u"testmmąöî", u"mmąöî2", u"fake@mmąöî", u"mmąöî", \
                    u"mmąöî", u"mmąöî", u"mmąöî", u"mmąöî", u"mmąöî"]
        dgm_cli.dbadd(self.db, self.config, uniargs_add)

        uniargs = [u"testmmąöî"]
        # The graph is sent to output using logger.output()
        capturer = Capturer(self.logger)
        dgm_cli.graphrules(self.db, self.config, uniargs)
        data = capturer.getCaptured().decode('utf-8')

        val = compare_to_ref("test_graphrules_nofile_2rules", "graph")
        assert data == val