Fixing post
This commit is contained in:
parent
9c62c7db2a
commit
3e9bce86ca
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import urllib
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
from pyvows import Vows
|
from pyvows import Vows
|
||||||
|
@ -60,7 +61,7 @@ class DjangoContext(Vows.Context):
|
||||||
return urllib2.urlopen(self.get_url(path))
|
return urllib2.urlopen(self.get_url(path))
|
||||||
|
|
||||||
def post(self, path, params):
|
def post(self, path, params):
|
||||||
return urllib2.urlopen(self.get_url(path), data=urllib2.urlencode(params))
|
return urllib2.urlopen(self.get_url(path), data=urllib.urlencode(params))
|
||||||
|
|
||||||
def get_url(self, path):
|
def get_url(self, path):
|
||||||
ctx = self.parent
|
ctx = self.parent
|
||||||
|
|
Reference in a new issue