def test_raises_exception_if_no_username_set(self): session = SauceSession() session.username = None with pytest.raises(KeyError): session.start()
def test_accepts_provided_username(self): user = '******' session = SauceSession() session.username = user assert session.username == user