werefox-cafe/tests/test_suite/identity_block.py

15 lines
770 B
Python
Executable File

#!/usr/bin/python
# Necessary imports
from robot.api.logger import info
from yaml import load, Loader
def load_data():
# This saves us going to like two buttons
with open('/data/identities.yml') as data_yaml:
data_dict = load(data_yaml, Loader=Loader)
# Here's the worst one-liner I've written in my whole career, enjoy
return {list(fuck)[0]: fuck[list(fuck)[0]] for fuck in [{z: {y[list(y)[0]]['url']: y for y in [{x: data_dict[x]} for x in data_dict]}[z] for z in {y[list(y)[0]]['url']: y for y in [{x: data_dict[x]} for x in data_dict]} if z != ''}[x] for x in {z: {y[list(y)[0]]['url']: y for y in [{x: data_dict[x]} for x in data_dict]}[z] for z in {y[list(y)[0]]['url']: y for y in [{x: data_dict[x]} for x in data_dict]} if z != ''}]}