@@ -73,13 +73,7 @@ describe("Low-level API tests", async () => {
73
73
74
74
it ( 'Login and get "me"' , async ( ) => {
75
75
nock ( "https://auth.tado.com" ) . post ( "/oauth/token" ) . reply ( 200 , auth_response ) ;
76
- nock ( "https://my.tado.com" )
77
- . get ( "/api/v2/me" )
78
- . reply ( 200 , me_response )
79
- . get ( "/api/v2/me" )
80
- . reply ( 200 , me_response ) // Needed twice otherwise consumed by login
81
- . get ( "/api/v2/homes/1907" )
82
- . reply ( 200 , home_response ) ;
76
+ nock ( "https://my.tado.com" ) . get ( "/api/v2/me" ) . reply ( 200 , me_response ) ;
83
77
84
78
const tado = new Tado ( ) ;
85
79
await tado . login ( "username" , "password" ) ;
@@ -111,11 +105,6 @@ describe("High-level API tests (v2)", async () => {
111
105
112
106
beforeEach ( async ( ) => {
113
107
nock ( "https://auth.tado.com" ) . post ( "/oauth/token" ) . reply ( 200 , auth_response ) ;
114
- nock ( "https://my.tado.com" )
115
- . get ( "/api/v2/me" )
116
- . reply ( 200 , me_response )
117
- . get ( "/api/v2/homes/1907" )
118
- . reply ( 200 , home_response ) ;
119
108
120
109
tado = new Tado ( ) ;
121
110
await tado . login ( "username" , "password" ) ;
@@ -840,11 +829,6 @@ describe("High-level API tests (TadoX)", async () => {
840
829
841
830
beforeEach ( async ( ) => {
842
831
nock ( "https://auth.tado.com" ) . post ( "/oauth/token" ) . reply ( 200 , auth_response ) ;
843
- nock ( "https://my.tado.com" )
844
- . get ( "/api/v2/me" )
845
- . reply ( 200 , me_response )
846
- . get ( "/api/v2/homes/1907" )
847
- . reply ( 200 , home_response_x ) ;
848
832
849
833
tado = new TadoX ( ) ;
850
834
await tado . login ( "username" , "password" ) ;
0 commit comments