Exemple #1
0
 def test_background_no_profile(self):
     response = MockResponse(content_json={"profile_list": {"data": []}})
     oauth = MockOAuth(response=response)
     with self.assertRaises(EduvpnException):
         _background(meta=self.meta,
                     builder=self.builder,
                     dialog=None,
                     oauth=oauth)
Exemple #2
0
 def test_background_one_profile(self, *_):
     response = MockResponse(
         content_json={
             "profile_list": {
                 "data": [
                     {
                         "display_name": "test 1",
                         "profile_id": "internet",
                         "two_factor": False
                     },
                 ]
             }
         })
     oauth = MockOAuth(response=response)
     _background(meta=self.meta,
                 builder=self.builder,
                 dialog=None,
                 oauth=oauth)