Skip to content

Commit

Permalink
Changed chat's service type to 5.
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hao committed May 10, 2021
1 parent 203ffcf commit 131c7dd
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 33 deletions.
2 changes: 1 addition & 1 deletion DynamicKey/AgoraDynamicKey/cpp/test/AccessToken2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class AccessToken2_test : public testing::Test {
"007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTU"
"zSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDA"
"B+lHrg=";

VerifyAccessToken2(expected, &key);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
ServiceTypeRtc = 1
ServiceTypeRtm = 2
ServiceTypeStreaming = 3
ServiceTypeChat = 4
ServiceTypeChat = 5

// Rtc
PrivilegeJoinChannel = 1
Expand Down Expand Up @@ -369,6 +369,8 @@ func (accessToken *AccessToken) newService(serviceType uint16) (service IService
service = NewServiceStreaming("", "")
case ServiceTypeChat:
service = NewServiceChat("")
default:
panic(fmt.Sprintf("new service failed: unknown service type `%v`", serviceType))
}
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func Test_AccessToken_Build_ServiceChatUser(t *testing.T) {

token, err := accessToken.Build()
AssertNil(t, err)
AssertEqual(t, "007eJxSYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWRgYGRjBfC4GIwsLI2MTQyNzY0AAAAD//7nNHTc=", token)
AssertEqual(t, "007eJxSYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrAyMDIxgPheDkYWFkbGJoZG5MSAAAP//H6UeuA==", token)
}

func Test_AccessToken_Build_ServiceChatApp(t *testing.T) {
Expand All @@ -163,7 +163,7 @@ func Test_AccessToken_Build_ServiceChatApp(t *testing.T) {

token, err := accessToken.Build()
AssertNil(t, err)
AssertEqual(t, "007eJxSYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCwMjAxOYz8AACAAA///45Rlg", token)
AssertEqual(t, "007eJxSYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZGRgZmMB8BgZAAAAA//+t8hhr", token)
}

func Test_AccessToken_Build_MultipleServices(t *testing.T) {
Expand Down Expand Up @@ -196,7 +196,7 @@ func Test_AccessToken_Build_MultipleServices(t *testing.T) {

token, err := accessToken.Build()
AssertNil(t, err)
AssertEqual(t, "007eJxSYJjAJd6te9Pl9I64rOhJZX5P9kz23jevVcrfUVn1hl+JW4gCg6W5gbOjsWlKqplBsomJmYlpUlJiqkWikaGpgZlhkrGx+xcBhggmBgZGBgYGFgZGMATxFRjMU8yNjM1MU5MsLYxNLEyNLc1TjVON0yxTTMwMklJSErkYjCwsjIxNDI3MjZng+jgZSlKLS+JLi1OLmMk0jAWuD1kUEAAA//9B1TVa", token)
AssertEqual(t, "007eJxSYHh7j83I4Q6X9f94Vt1zS7du+NrqujQ86nSB+NJZn+eYG1kqMFiaGzg7GpumpJoZJJuYmJmYJiUlplokGhmaGpgZJhkbu38RYIhgYmBgZGBgYGFgBEMQX4HBPMXcyNjMNDXJ0sLYxMLU2NI81TjVOM0yxcTMICklJZGLwcjCwsjYxNDI3JgJro+ToSS1uCS+tDi1iJlMw1jh+pBFAQEAAP//oGY29w==", token)
}

func Test_AccessToken_Parse_TokenRtc(t *testing.T) {
Expand Down Expand Up @@ -285,7 +285,7 @@ func Test_AccessToken_Parse_TokenRtm(t *testing.T) {

func Test_AccessToken_Parse_TokenChatUser(t *testing.T) {
accessToken := CreateAccessToken()
res, err := accessToken.Parse("007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc=")
res, err := accessToken.Parse("007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg=")

AssertNil(t, err)
AssertEqual(t, true, res)
Expand All @@ -302,7 +302,7 @@ func Test_AccessToken_Parse_TokenChatUser(t *testing.T) {

func Test_AccessToken_Parse_TokenChatApp(t *testing.T) {
accessToken := CreateAccessToken()
res, err := accessToken.Parse("007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg")
res, err := accessToken.Parse("007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr")

AssertNil(t, err)
AssertEqual(t, true, res)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public enum PrivilegeChat {
public static final short SERVICE_TYPE_RTC = 1;
public static final short SERVICE_TYPE_RTM = 2;
public static final short SERVICE_TYPE_STREAMING = 3;
public static final short SERVICE_TYPE_CHAT = 4;
public static final short SERVICE_TYPE_CHAT = 5;

public String appCert = "";
public String appId = "";
Expand Down Expand Up @@ -118,7 +118,7 @@ public Service getService(short serviceType) {
if (serviceType == SERVICE_TYPE_CHAT) {
return new ServiceChat();
}
return null;
throw new IllegalArgumentException(String.format("unknown service type: `%d`", serviceType));
}

public byte[] getSign() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void build_ServiceChat_userToken() throws Exception {
serviceChat.addPrivilegeChat(AccessToken2.PrivilegeChat.PRIVILEGE_CHAT_USER, expire);

accessToken.addService(serviceChat);
String expected = "007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc=";
String expected = "007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg=";

assertEquals(expected, accessToken.build());
}
Expand All @@ -122,7 +122,7 @@ public void build_ServiceChat_appToken() throws Exception {
serviceChat.addPrivilegeChat(AccessToken2.PrivilegeChat.PRIVILEGE_CHAT_APP, expire);

accessToken.addService(serviceChat);
String expected = "007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg";
String expected = "007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr";

assertEquals(expected, accessToken.build());
}
Expand Down Expand Up @@ -152,7 +152,7 @@ public void build_multi_service() throws Exception {
assertEquals(uid, serviceRtc.uid);
assertEquals(userId, serviceRtm.userId);

String expected = "007eJxTYJC/8fTS2VM8fzpL8u6zXrB0vvfF6Lhahdx9D8eH/Rwv4g4pMFiaGzg7GpumpJoZJJuYmJmYJiUlplokGhmaGpgZJhkbu38RYIhgYmBgZGBgYAaSLEAM4jOBSWYwyQImFRjMU8yNjM1MU5MsLYxNLEyNLc1TjVON0yxTTMwMklJSErkYjCwsjIxNDI3MjZmA5kBM4mQoSS0uiS8tTi1igQsiKwUAECouiQ==";
String expected = "007eJxTYPg19dsX8xO2Nys/bpSeoH/0j9CvSs1JWib9291PKC53l85UYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyMDAwAwkWYAYxGcCk8xgkgVMKjCYp5gbGZuZpiZZWhibWJgaW5qnGqcap1mmmJgZJKWkJHIxGFlYGBmbGBqZGzMBzYGYxMlQklpcEl9anFrEChdEVgoAw6ct/Q==";
String token = accessToken.build();
assertEquals(expected, token);
}
Expand Down Expand Up @@ -208,7 +208,7 @@ public void parse_TokenRtm() {
@Test
public void parse_TokenChatUser() {
AccessToken2 accessToken = new AccessToken2();
boolean res = accessToken.parse("007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc=");
boolean res = accessToken.parse("007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg=");
assertTrue(res);
assertEquals(appId, accessToken.appId);
assertEquals(expire, accessToken.expire);
Expand All @@ -223,7 +223,7 @@ public void parse_TokenChatUser() {
@Test
public void parse_TokenChatApp() {
AccessToken2 accessToken = new AccessToken2();
boolean res = accessToken.parse("007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg");
boolean res = accessToken.parse("007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr");
assertTrue(res);
assertEquals(appId, accessToken.appId);
assertEquals(expire, accessToken.expire);
Expand Down
2 changes: 1 addition & 1 deletion DynamicKey/AgoraDynamicKey/nodejs/src/AccessToken2.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ServiceRtm extends Service{
}
ServiceRtm.kPrivilegeLogin = 1

const kChatServiceType = 4
const kChatServiceType = 5
class ServiceChat extends Service{
constructor(user_id) {
super(kChatServiceType)
Expand Down
4 changes: 2 additions & 2 deletions DynamicKey/AgoraDynamicKey/nodejs/test/AccessToken2Test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
};

exports.AccessToken_Test_buildChatUserToken = function (test) {
var expected = "007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc="
var expected = "007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg="

var token = new AccessToken2(appID, appCertificate, ts, expire)
token.salt = salt
Expand All @@ -96,7 +96,7 @@
}

exports.AccessToken_Test_buildChatAppToken = function (test) {
var expected = "007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg"
var expected = "007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr"

var token = new AccessToken2(appID, appCertificate, ts, expire)
token.salt = salt
Expand Down
5 changes: 4 additions & 1 deletion DynamicKey/AgoraDynamicKey/php/src/AccessToken2.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function unpack(&$data)

class ServiceChat extends Service
{
const SERVICE_TYPE = 4;
const SERVICE_TYPE = 5;
const PRIVILEGE_USER = 1;
const PRIVILEGE_APP = 2;
public $userId;
Expand Down Expand Up @@ -226,6 +226,9 @@ public function parse($token)
for ($i = 0; $i < $serviceNum; $i++) {
$serviceTye = Util::unpackUint16($data);
$service = $servicesObj[$serviceTye];
if ($service == null) {
return false;
}
$service->unpack($data);
$this->services[$serviceTye] = $service;
}
Expand Down
12 changes: 6 additions & 6 deletions DynamicKey/AgoraDynamicKey/php/test/AccessToken2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function test_build_ServiceChat_user() {

$accessToken->addService($serviceChat);
$token = $accessToken->build();
Util::assertEqual("007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc=", $token);
Util::assertEqual("007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg=", $token);
}

public function test_build_ServiceChat_app() {
Expand All @@ -95,7 +95,7 @@ public function test_build_ServiceChat_app() {

$accessToken->addService($serviceChat);
$token = $accessToken->build();
Util::assertEqual("007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg", $token);
Util::assertEqual("007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr", $token);
}

public function test_build_multi_service()
Expand All @@ -120,7 +120,7 @@ public function test_build_multi_service()
$accessToken->addService($serviceChat);

$token = $accessToken->build();
Util::assertEqual("007eJxTYJC/8fTS2VM8fzpL8u6zXrB0vvfF6Lhahdx9D8eH/Rwv4g4pMFiaGzg7GpumpJoZJJuYmJmYJiUlplokGhmaGpgZJhkbu38RYIhgYmBgZGBgYAaSLEAM4jOBSWYwyQImFRjMU8yNjM1MU5MsLYxNLEyNLc1TjVON0yxTTMwMklJSErkYjCwsjIxNDI3MjZmA5kBM4mQoSS0uiS8tTi1igQsiKwUAECouiQ==", $token);
Util::assertEqual("007eJxTYPg19dsX8xO2Nys/bpSeoH/0j9CvSs1JWib9291PKC53l85UYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyMDAwAwkWYAYxGcCk8xgkgVMKjCYp5gbGZuZpiZZWhibWJgaW5qnGqcap1mmmJgZJKWkJHIxGFlYGBmbGBqZGzMBzYGYxMlQklpcEl9anFrEChdEVgoAw6ct/Q==", $token);
}

public function test_parse_TokenRtc()
Expand All @@ -145,7 +145,7 @@ public function test_parse_TokenRtc()
public function test_parse_TokenRtc_Rtm_Chat_MultiService()
{
$accessToken = new AccessToken2();
$res = $accessToken->parse("007eJxTYJC/8fTS2VM8fzpL8u6zXrB0vvfF6Lhahdx9D8eH/Rwv4g4pMFiaGzg7GpumpJoZJJuYmJmYJiUlplokGhmaGpgZJhkbu38RYIhgYmBgZGBgYAaSLEAM4jOBSWYwyQImFRjMU8yNjM1MU5MsLYxNLEyNLc1TjVON0yxTTMwMklJSErkYjCwsjIxNDI3MjZmA5kBM4mQoSS0uiS8tTi1igQsiKwUAECouiQ==");
$res = $accessToken->parse("007eJxTYPg19dsX8xO2Nys/bpSeoH/0j9CvSs1JWib9291PKC53l85UYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyMDAwAwkWYAYxGcCk8xgkgVMKjCYp5gbGZuZpiZZWhibWJgaW5qnGqcap1mmmJgZJKWkJHIxGFlYGBmbGBqZGzMBzYGYxMlQklpcEl9anFrEChdEVgoAw6ct/Q==");
Util::assertEqual(true, $res);
Util::assertEqual($this->appId, $accessToken->appId);
Util::assertEqual($this->expire, $accessToken->expire);
Expand Down Expand Up @@ -185,7 +185,7 @@ public function test_parse_TokenRtm()
public function test_parse_TokenChat_user()
{
$accessToken = new AccessToken2();
$res = $accessToken->parse("007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamBmmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc=");
$res = $accessToken->parse("007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTAzTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg=");
Util::assertEqual(true, $res);
Util::assertEqual($this->appId, $accessToken->appId);
Util::assertEqual($this->expire, $accessToken->expire);
Expand All @@ -200,7 +200,7 @@ public function test_parse_TokenChat_user()
public function test_parse_TokenChat_app()
{
$accessToken = new AccessToken2();
$res = $accessToken->parse("007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcwMk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg");
$res = $accessToken->parse("007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGaYZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr");
Util::assertEqual(true, $res);
Util::assertEqual($this->appId, $accessToken->appId);
Util::assertEqual($this->expire, $accessToken->expire);
Expand Down
2 changes: 1 addition & 1 deletion DynamicKey/AgoraDynamicKey/python/src/AccessToken2.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def unpack(self, buffer):


class ServiceChat(Service):
kServiceType = 4
kServiceType = 5

kPrivilegeUser = 1
kPrivilegeApp = 2
Expand Down
14 changes: 7 additions & 7 deletions DynamicKey/AgoraDynamicKey/python/test/AccessToken2Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def test_service_chat_user(self):
self.__token.add_service(service)
result = self.__token.build()

expected = '007eJxTYFi3mPnI/sqHC8JXrfX5bL/tHAdjz63WEKWMnh8ipxhXzVqiwGBpbuDsaGyakmpmkGxiYmZimpSUmGqRaGRoamB' \
'mmGRs7P5FgCGCiYGBkQGEWYCYEcznYjCysDAyNjE0MjcGALnNHTc='
expected = '007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTA' \
'zTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg='
self.assertEqual(expected, result)

def test_service_chat_app(self):
Expand All @@ -76,8 +76,8 @@ def test_service_chat_app(self):
self.__token.add_service(service)
result = self.__token.build()

expected = '007eJxTYJgmz2E3p0Bj3s3UF6u4UvfbqlS55NvvmC5erH77zbXpodsVGCzNDZwdjU1TUs0Mkk1MzExMk5ISUy0SjQxNDcw' \
'Mk4yN3b8IMEQwMTAwMoAwCxAzgfkMDAD45Rlg'
expected = '007eJxTYNDNaz3snC8huEfHWdz6s98qltq4zqy9fl99Uh0FDvy6F6DAYGlu4OxobJqSamaQbGJiZmKalJSYapFoZGhqYGa' \
'YZGzs/kWAIYKJgYGRAYRZgZgJzGdgAACt8hhr'
self.assertEqual(expected, result)

def test_multi_service(self):
Expand All @@ -98,7 +98,7 @@ def test_multi_service(self):
self.__token.add_service(chat)
result = self.__token.build()

expected = '007eJxTYJC/8fTS2VM8fzpL8u6zXrB0vvfF6Lhahdx9D8eH/Rwv4g4pMFiaGzg7GpumpJoZJJuYmJmYJiUlplokGhmaGpg' \
'ZJhkbu38RYIhgYmBgZGBgYAaSLEAM4jOBSWYwyQImFRjMU8yNjM1MU5MsLYxNLEyNLc1TjVON0yxTTMwMklJSErkYjCwsj' \
'IxNDI3MjZmA5kBM4mQoSS0uiS8tTi1igQsiKwUAECouiQ=='
expected = '007eJxTYPg19dsX8xO2Nys/bpSeoH/0j9CvSs1JWib9291PKC53l85UYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTA' \
'zTDI2dv8iwBDBxMDAyMDAwAwkWYAYxGcCk8xgkgVMKjCYp5gbGZuZpiZZWhibWJgaW5qnGqcap1mmmJgZJKWkJHIxGFlYG' \
'BmbGBqZGzMBzYGYxMlQklpcEl9anFrEChdEVgoAw6ct/Q=='
self.assertEqual(expected, result)
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_service_chat_user(self):

expected = '007eJxTYNAIsnbS3v/A5t2TC6feR15r+6cq8bqAvfaW+tk/Vzz+p6xTYLA0N3B2NDZNSTUzSDYxMTMxTUpKTLVINDI0NTA' \
'zTDI2dv8iwBDBxMDAyADCrEDMCOZzMRhZWBgZmxgamRsDAB+lHrg='

self.assertEqual(expected, result)

def test_service_chat_app(self):
Expand Down

0 comments on commit 131c7dd

Please sign in to comment.