コード例 #1
0
ファイル: decomposer.py プロジェクト: amarh/openPLM
    def setUp(self):
        super(DecomposerTestCase, self).setUp()
        self.document = Document3DController.create('doc1', 'Document3D',
                'a', self.user, self.DATA)
        self.controller.attach_to_document(self.document)

        f=open("apps/document3D/data_test/test.stp")
        myfile = File(f)
        myfile.name="test.stp"
        self.stp=self.document.add_file(myfile)

        self.ctrl2 = Document3DController.create('doc2', 'Document3D',
                'a', self.user, self.DATA)
コード例 #2
0
ファイル: decomposer.py プロジェクト: pcon-world/pcon_db
    def setUp(self):
        super(DecomposerTestCase, self).setUp()
        self.document = Document3DController.create('doc1', 'Document3D', 'a',
                                                    self.user, self.DATA)
        self.controller.attach_to_document(self.document)

        f = open("apps/document3D/data_test/test.stp")
        myfile = File(f)
        myfile.name = "test.stp"
        self.stp = self.document.add_file(myfile)

        self.ctrl2 = Document3DController.create('doc2', 'Document3D', 'a',
                                                 self.user, self.DATA)
コード例 #3
0
ファイル: arborescense.py プロジェクト: niu9146/openPLM
 def setUp(self):
     super(arborescense_Test, self).setUp()
     self.document = Document3DController.create('doc1', 'Document3D', 'a',
                                                 self.user, self.DATA)
     f = open("apps/document3D/data_test/test.stp")
     myfile = File(f)
     self.stp = self.document.add_file(myfile)
     self.controller.attach_to_document(self.document.object)
     self.data_to_decompose = self.update_data(self.stp)
コード例 #4
0
ファイル: arborescense.py プロジェクト: amarh/openPLM
 def setUp(self):
     super(arborescense_Test, self).setUp()
     self.document = Document3DController.create('doc1', 'Document3D',
             'a', self.user, self.DATA)
     f=open("apps/document3D/data_test/test.stp")
     myfile = File(f)
     self.stp=self.document.add_file(myfile)
     self.controller.attach_to_document(self.document.object)
     self.data_to_decompose = self.update_data(self.stp)
コード例 #5
0
ファイル: arborescense.py プロジェクト: niu9146/openPLM
    def test_get_product(self):
        #We verify if the structure of the tree is the same for a file without decompose  and the new file generated once decomposed

        product = self.document.get_product(self.stp)
        self.post(self.base_url + "decompose/" + str(self.stp.id) + "/",
                  self.data_to_decompose)
        ctrl = Document3DController(
            Document3D.objects.get(id=self.document.id), self.user)
        product2 = ctrl.get_product(ctrl.files[0], True)
        self.assertTrue(same_structure(product, product2))
コード例 #6
0
 def setUp(self):
     super(view_3dTest, self).setUp()
     self.document = Document3DController.create('doc1', 'Document3D',
             'a', self.user, self.DATA)