def test_check_matrix(self):
        expect = [[1, 0, 1, 0, 1, 0],
                  [1, 0, 0, 0, 0, 1],
                  [1, 1, 0, 1, 0, 0],
                  [1, 0, 1, 1, 1, 1],
                  [1, 0, 1, 1, 0, 0],
                  [1, 1, 1, 1, 1, 1]]
        #rotated to the right
        test = [[1,1,1,1,1,1],
                [0,0,1,0,0,1],
                [1,0,0,1,1,1],
                [0,0,1,1,1,1],
                [1,0,0,1,0,1],
                [0,1,0,1,0,1]]

        db = DBConnection("../data_base/test_base.db")
        det = DataMatrixDetector(db)
        det.set_template("../data_matrixes/template.jpg")
        self.assertTrue(det.check_matrix(expect))
        self.assertFalse(det.check_matrix(test))