예제 #1
0
    def test_to_from_json(self):
        c = AppAssertionCredentials(
            scope=['http://example.com/a', 'http://example.com/b'])
        json = c.to_json()
        c2 = Credentials.new_from_json(json)

        self.assertEqual(c.access_token, c2.access_token)
예제 #2
0
 def test_to_json_and_from_json(self):
     credentials = AppAssertionCredentials(
         scope=['http://example.com/a', 'http://example.com/b'])
     json = credentials.to_json()
     credentials_from_json = Credentials.new_from_json(json)
     self.assertEqual(credentials.access_token,
                      credentials_from_json.access_token)
예제 #3
0
  def test_to_from_json(self):
    c = AppAssertionCredentials(scope=['http://example.com/a',
                                       'http://example.com/b'])
    json = c.to_json()
    c2 = Credentials.new_from_json(json)

    self.assertEqual(c.access_token, c2.access_token)
예제 #4
0
 def test_to_json_and_from_json(self):
     credentials = AppAssertionCredentials(
         scope=['http://example.com/a', 'http://example.com/b'])
     json = credentials.to_json()
     credentials_from_json = Credentials.new_from_json(json)
     self.assertEqual(credentials.access_token,
                      credentials_from_json.access_token)