示例#1
0
    def test_list_users(self):
        exp = [{
            'email': '*****@*****.**',
            'name': 'Admin'
        }, {
            'email': '*****@*****.**',
            'name': 'Demo'
        }, {
            'email': '*****@*****.**',
            'name': 'Dude'
        }, {
            'email': '*****@*****.**',
            'name': '*****@*****.**'
        }, {
            'email': '*****@*****.**',
            'name': 'Shared'
        }]
        self.assertEqual(User.list_users(), exp)

        exp = [{
            'email': '*****@*****.**',
            'name': 'Admin'
        }, {
            'email': '*****@*****.**',
            'name': 'Demo'
        }, {
            'email': '*****@*****.**',
            'name': 'Dude'
        }, {
            'email': '*****@*****.**',
            'name': '*****@*****.**'
        }]
        self.assertEqual(User.list_users(access_only=True), exp)
示例#2
0
 def get(self, allowed_pools_type):
     sequencers = []
     allowed_pools_name = allowed_pools_type.split("_")[0].title()
     for model, lanes in SequencingProcess.sequencer_lanes.items():
         for sequencer in Equipment.list_equipment(model):
             sequencer['lanes'] = lanes
             sequencers.append(sequencer)
     self.render('sequencing.html',
                 users=User.list_users(),
                 sequencers=sequencers,
                 allowed_pools_type=allowed_pools_type,
                 allowed_pools_name=allowed_pools_name)
示例#3
0
 def get(self):
     self.render('access.html',
                 users=User.list_users(),
                 access_users=User.list_users(access_only=True))