def test_setting_session_auth_has_previous_auth(self): auth1 = (uuid4().hex, uuid4().hex) auth2 = (uuid4().hex, uuid4().hex) session = FakeSession(uuid4, auth1) client = _Client(uuid4().hex, uuid4().hex, auth2, session=session) # Make sure we don't override already existing auth self.assertNotEqual(client.session.auth, auth2) # The previous auth should still be there self.assertEqual(client.session.auth, auth1)
def test_setting_session_auth_no_previous_auth(self): auth = (uuid4().hex, uuid4().hex) client = _Client(uuid4().hex, uuid4().hex, auth) self.assertEqual(client.session.auth, auth)