@@ -70,8 +70,7 @@ def test_onprogress(self):
70
70
content = f .read ()
71
71
72
72
resp = self .client .post ('/endpoint/' , content , content_type = "application/json" )
73
- self .assertEqual (resp .status_code , 200 )
74
- self .assertEqual (resp .content , 'Done' )
73
+ self .assertContains (resp , 'Done' , status_code = 200 )
75
74
76
75
job = EncodeJob .objects .get (id = self .job_id )
77
76
self .assertEqual (job .state , 1 )
@@ -81,8 +80,7 @@ def test_onerror(self):
81
80
content = f .read ()
82
81
83
82
resp = self .client .post ('/endpoint/' , content , content_type = "application/json" )
84
- self .assertEqual (resp .status_code , 200 )
85
- self .assertEqual (resp .content , 'Done' )
83
+ self .assertContains (resp , 'Done' , status_code = 200 )
86
84
87
85
job = EncodeJob .objects .get (id = self .job_id )
88
86
self .assertEqual (job .state , 2 )
@@ -93,8 +91,7 @@ def test_oncomplete(self):
93
91
content = f .read ()
94
92
95
93
resp = self .client .post ('/endpoint/' , content , content_type = "application/json" )
96
- self .assertEqual (resp .status_code , 200 )
97
- self .assertEqual (resp .content , 'Done' )
94
+ self .assertContains (resp , 'Done' , status_code = 200 )
98
95
99
96
job = EncodeJob .objects .get (id = self .job_id )
100
97
self .assertEqual (job .state , 4 )
0 commit comments