diff --git a/vows/client_vows.py b/vows/client_vows.py index 7300a27..f828aac 100644 --- a/vows/client_vows.py +++ b/vows/client_vows.py @@ -24,28 +24,28 @@ class DjangoHTTPTestClientCompatibilityVows(DjangoContext): expect(topic.status_code).to_equal(200) def should_ask_for_my_name(self, topic): - expect(topic.content).to_equal('What\'s your name?') + expect(topic).contains('What\'s your name?') class SimpleGetWithParams(DjangoContext): def topic(self): return self.get('/say/?name=Rafael') def should_say_hello_to_me(self, topic): - expect(topic.content).to_equal('Hello, Rafael!') + expect(topic).contains('Hello, Rafael!') class SimplePost(DjangoContext): def topic(self): return self.post('/post_it/', {'value': 'posted!'}) def should_be_posted(self, topic): - expect(topic.content).to_equal('posted!') + expect(topic).contains('posted!') class PostFile(DjangoContext): def topic(self): return self.post('/post_file/', {'the_file': open(self.TEST_FILE_PATH)}) def should_be_posted_to_the_server(self, topic): - expect(topic.content).to_equal("the contents") + expect(topic).contains("the contents") class WhenNotFound(DjangoContext): def topic(self): diff --git a/vows/settings_vows.py b/vows/settings_vows.py index 827ad1f..2228358 100644 --- a/vows/settings_vows.py +++ b/vows/settings_vows.py @@ -26,7 +26,7 @@ class SettingsOverridingVows(DjangoContext): expect(topic.status_code).to_equal(200) def should_ask_for_my_name(self, topic): - expect(topic.content).to_equal("What's your name?") + expect(topic).contains("What's your name?") class SayHelloWithoutName(DjangoContext): def topic(self): @@ -37,7 +37,7 @@ class SettingsOverridingVows(DjangoContext): expect(topic.status_code).to_equal(200) def should_(self, topic): - expect(topic.content).to_equal("Hello, guest!") + expect(topic).contains("Hello, guest!") class UseDecoratorToChangeSettings(DjangoContext): @override_settings(SAY_HELLO_WITHOUT_NAME=True) @@ -45,4 +45,4 @@ class SettingsOverridingVows(DjangoContext): return self.get('/say/') def should_say_hello_to_guest(self, topic): - expect(topic.content).to_equal("Hello, guest!") + expect(topic).contains("Hello, guest!")