@@ -17,7 +17,6 @@ import eneryIQ_savings_response from "./response.eneryIQ.savings.json";
17
17
import eneryIQ_tariff_response from "./response.eneryIQ.tariff.json" ;
18
18
import heating_system_response from "./response.heatingSystem.json" ;
19
19
import home_response from "./response.home.json" ;
20
- import home_response_x from "./response.home.x.json" ;
21
20
import incident_detection_response from "./response.incidentDetection.json" ;
22
21
import installations_response from "./response.installations.json" ;
23
22
import invitations_response from "./response.invitations.json" ;
@@ -73,13 +72,7 @@ describe("Low-level API tests", async () => {
73
72
74
73
it ( 'Login and get "me"' , async ( ) => {
75
74
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 ) ;
75
+ nock ( "https://my.tado.com" ) . get ( "/api/v2/me" ) . reply ( 200 , me_response ) ;
83
76
84
77
const tado = new Tado ( ) ;
85
78
await tado . login ( "username" , "password" ) ;
@@ -111,11 +104,6 @@ describe("High-level API tests (v2)", async () => {
111
104
112
105
beforeEach ( async ( ) => {
113
106
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
107
120
108
tado = new Tado ( ) ;
121
109
await tado . login ( "username" , "password" ) ;
@@ -840,11 +828,6 @@ describe("High-level API tests (TadoX)", async () => {
840
828
841
829
beforeEach ( async ( ) => {
842
830
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
831
849
832
tado = new TadoX ( ) ;
850
833
await tado . login ( "username" , "password" ) ;
0 commit comments