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)
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)
def get(self): self.render('access.html', users=User.list_users(), access_users=User.list_users(access_only=True))