Esempio n. 1
0
 def tearDown(self):
     for s in self.services:
         s.setAllowManualUncertainty(False)
         s.setUncertainties([])
         s.setPrecisionFromUncertainty(False)
     logout()
     super(TestManualUncertainty, self).tearDown()
Esempio n. 2
0
 def tearDown(self):
     for s in self.services:
         s.setAllowManualUncertainty(False)
         s.setUncertainties([])
         s.setPrecisionFromUncertainty(False)
     logout()
     super(TestManualUncertainty, self).tearDown()
Esempio n. 3
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()
Esempio n. 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()
Esempio n. 5
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()
Esempio n. 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()
Esempio n. 7
0
    def tearDown(self):
        # Restore
        for s in self.services:
            s.setHidden(False)

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

        logout()
        super(TestHiddenAnalyses, self).tearDown()
Esempio n. 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()
Esempio n. 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()
Esempio n. 10
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()
Esempio n. 11
0
 def tearDown(self):
     logout()
     super(TestInstrumentAlerts, self).tearDown()
Esempio n. 12
0
 def tearDown(self):
     logout()
     super(TestInstrumentAlerts, self).tearDown()
Esempio n. 13
0
 def tearDown(self):
     logout()
     super(TestShowPartitions, self).tearDown()