コード例 #1
0
 def tearDown(self):
     for s in self.services:
         s.setAllowManualUncertainty(False)
         s.setUncertainties([])
         s.setPrecisionFromUncertainty(False)
     logout()
     super(TestManualUncertainty, self).tearDown()
コード例 #2
0
 def tearDown(self):
     for s in self.services:
         s.setAllowManualUncertainty(False)
         s.setUncertainties([])
         s.setPrecisionFromUncertainty(False)
     logout()
     super(TestManualUncertainty, self).tearDown()
コード例 #3
0
ファイル: test_limitdetections.py プロジェクト: nafwa03/olims
 def tearDown(self):
     for s in self.services:
         s.setDetectionLimitSelector(False)
         s.setAllowManualDetectionLimit(False)
         s.setLowerDetectionLimit(str(0))
         s.setUpperDetectionLimit(str(1000))
     logout()
     super(TestLimitDetections, self).tearDown()
コード例 #4
0
 def tearDown(self):
     for s in self.services:
         s.setDetectionLimitSelector(False)
         s.setAllowManualDetectionLimit(False)
         s.setLowerDetectionLimit(str(0))
         s.setUpperDetectionLimit(str(1000))
     logout()
     super(TestLimitDetections, self).tearDown()
コード例 #5
0
ファイル: testing.py プロジェクト: nafwa03/olims
    def setUpPloneSite(self, portal):
        login(portal.aq_parent, SITE_OWNER_NAME)

        wf = getToolByName(portal, 'portal_workflow')
        wf.setDefaultChain('plone_workflow')
        setupPortalContent(portal)

        # make sure we have folder_listing as a template
        portal.getTypeInfo().manage_changeProperties(
            view_methods=['folder_listing'],
            default_view='folder_listing')

        applyProfile(portal, 'bika.lims:default')

        # Add some test users
        for role in ('LabManager',
                     'LabClerk',
                     'Analyst',
                     'Verifier',
                     'Sampler',
                     'Preserver',
                     'Publisher',
                     'Member',
                     'Reviewer',
                     'RegulatoryInspector'):
            for user_nr in range(2):
                if user_nr == 0:
                    username = "******" % (role.lower())
                else:
                    username = "******" % (role.lower(), user_nr)
                try:
                    member = portal.portal_registration.addMember(
                        username,
                        username,
                        properties={
                            'username': username,
                            'email': username + "@example.com",
                            'fullname': username}
                    )
                    # Add user to all specified groups
                    group_id = role + "s"
                    group = portal.portal_groups.getGroupById(group_id)
                    if group:
                        group.addMember(username)
                    # Add user to all specified roles
                    member._addRole(role)
                    # If user is in LabManagers, add Owner local role on clients folder
                    if role == 'LabManager':
                        portal.clients.manage_setLocalRoles(username, ['Owner', ])
                except ValueError:
                    pass  # user exists

        # Force the test browser to show the site always in 'en'
        ltool = portal.portal_languages
        ltool.manage_setLanguageSettings('en', ['en'], setUseCombinedLanguageCodes=False, startNeutral=True)

        logout()
コード例 #6
0
    def tearDown(self):
        # Restore
        for s in self.services:
            s.setHidden(False)

        self.analysisprofile.setAnalysisServicesSettings([])
        self.artemplate.setAnalysisServicesSettings([])

        logout()
        super(TestHiddenAnalyses, self).tearDown()
コード例 #7
0
ファイル: test_hiddenanalyses.py プロジェクト: nafwa03/olims
    def tearDown(self):
        # Restore
        for s in self.services:
            s.setHidden(False)

        self.analysisprofile.setAnalysisServicesSettings([])
        self.artemplate.setAnalysisServicesSettings([])

        logout()
        super(TestHiddenAnalyses, self).tearDown()
コード例 #8
0
    def setUpPloneSite(self, portal):
        login(portal.aq_parent, SITE_OWNER_NAME)

        wf = getToolByName(portal, 'portal_workflow')
        wf.setDefaultChain('plone_workflow')
        setupPortalContent(portal)

        # make sure we have folder_listing as a template
        portal.getTypeInfo().manage_changeProperties(
            view_methods=['folder_listing'], default_view='folder_listing')

        applyProfile(portal, 'bika.lims:default')

        # Add some test users
        for role in ('LabManager', 'LabClerk', 'Analyst', 'Verifier',
                     'Sampler', 'Preserver', 'Publisher', 'Member', 'Reviewer',
                     'RegulatoryInspector'):
            for user_nr in range(2):
                if user_nr == 0:
                    username = "******" % (role.lower())
                else:
                    username = "******" % (role.lower(), user_nr)
                try:
                    member = portal.portal_registration.addMember(
                        username,
                        username,
                        properties={
                            'username': username,
                            'email': username + "@example.com",
                            'fullname': username
                        })
                    # Add user to all specified groups
                    group_id = role + "s"
                    group = portal.portal_groups.getGroupById(group_id)
                    if group:
                        group.addMember(username)
                    # Add user to all specified roles
                    member._addRole(role)
                    # If user is in LabManagers, add Owner local role on clients folder
                    if role == 'LabManager':
                        portal.clients.manage_setLocalRoles(
                            username, [
                                'Owner',
                            ])
                except ValueError:
                    pass  # user exists

        # Force the test browser to show the site always in 'en'
        ltool = portal.portal_languages
        ltool.manage_setLanguageSettings('en', ['en'],
                                         setUseCombinedLanguageCodes=False,
                                         startNeutral=True)

        logout()
コード例 #9
0
    def setUpPloneSite(self, portal):
        super(BikaTestLayer, self).setUpPloneSite(portal)

        login(portal.aq_parent, SITE_OWNER_NAME)  # again

        # load test data
        self.request = makerequest(portal.aq_parent).REQUEST
        self.request.form['setupexisting'] = 1
        self.request.form['existing'] = "bika.lims:test"
        lsd = LoadSetupData(portal, self.request)
        lsd()

        logout()
コード例 #10
0
ファイル: testing.py プロジェクト: nafwa03/olims
    def setUpPloneSite(self, portal):
        super(BikaTestLayer, self).setUpPloneSite(portal)

        login(portal.aq_parent, SITE_OWNER_NAME)  # again

        # load test data
        self.request = makerequest(portal.aq_parent).REQUEST
        self.request.form['setupexisting'] = 1
        self.request.form['existing'] = "bika.lims:test"
        lsd = LoadSetupData(portal, self.request)
        lsd()

        logout()
コード例 #11
0
ファイル: test_instruments.py プロジェクト: nafwa03/olims
 def tearDown(self):
     logout()
     super(TestInstrumentAlerts, self).tearDown()
コード例 #12
0
 def tearDown(self):
     logout()
     super(TestInstrumentAlerts, self).tearDown()
コード例 #13
0
ファイル: test_showpartitions.py プロジェクト: pureboy8/OLiMS
 def tearDown(self):
     logout()
     super(TestShowPartitions, self).tearDown()