Exemple #1
0
 def setUp(self):
     from .credentials import NEM_USERNAME, NEM_PASSWORD
     username = NEM_USERNAME
     password = NEM_PASSWORD
     self.assertFalse(username is None or password is None)
     self.news = News(username, password)
     self.map = Map(username, password)
Exemple #2
0
 def setUp(self):
     from .credentials import NEM_USERNAME, NEM_PASSWORD
     username = NEM_USERNAME
     password = NEM_PASSWORD
     self.assertFalse(username is None or password is None)
     self.news = News(username, password)
     self.map = Map(username, password)
Exemple #3
0
class TestNEM(unittest.TestCase):

    def setUp(self):
        from .credentials import NEM_USERNAME, NEM_PASSWORD
        username = NEM_USERNAME
        password = NEM_PASSWORD
        self.assertFalse(username is None or password is None)
        self.news = News(username, password)
        self.map = Map(username, password)

    def test_news(self):
        # News test times out
        # data = self.news.search("pennsylvania")
        # self.assertEquals(data['result_data'][0]['content_type'], 'news')
        pass

    def test_map(self):
        data = self.map.search("Towne")
        self.assertEquals(data['result_data'][0]['content_type'], 'map')
from penn import Transit, Directory, Dining, DiningV2, Registrar, Map, Laundry, StudySpaces, Calendar, Fitness, Wharton
from os import getenv

din = Dining(getenv("DIN_USERNAME"), getenv("DIN_PASSWORD"))
dinV2 = DiningV2(getenv("DIN_USERNAME"), getenv("DIN_PASSWORD"))
reg = Registrar(getenv("REG_USERNAME"), getenv("REG_PASSWORD"))
penn_dir = Directory(getenv("DIR_USERNAME"), getenv("DIR_PASSWORD"))
map_search = Map(getenv("NEM_USERNAME"), getenv("NEM_PASSWORD"))
transit = Transit(getenv("TRANSIT_USERNAME"), getenv("TRANSIT_PASSWORD"))
laundry = Laundry()
studyspaces = StudySpaces(getenv("LIBCAL_ID"), getenv("LIBCAL_SECRET"))
wharton = Wharton()
fitness = Fitness(getenv("FITNESS_TOKEN"))
calendar = Calendar()
wharton = Wharton()
depts = {
    "AAMW": "Art & Arch of Med. World",
    "ACCT": "Accounting",
    "AFRC": "Africana Studies",
    "AFST": "African Studies Program",
    "ALAN": "Asian Languages",
    "AMCS": "Applied Math & Computatnl Sci.",
    "ANAT": "Anatomy",
    "ANCH": "Ancient History",
    "ANEL": "Ancient Near East Languages",
    "ANTH": "Anthropology",
    "ARAB": "Arabic",
    "ARCH": "Architecture",
    "ARTH": "Art History",
    "ASAM": "Asian American Studies",
    "ASTR": "Astronomy",