After removing the incorrect versions and installing the correct ones,
I ran a simple md5 checksum to make sure that both my local dev and
prod versions match:
from oauth import oauth
from md5 import md5
print "You are using version: ", oauth.VERSION
filename = oauth.__file__[:-1]
print "Your OAuth file is located here: ", filename
checksum = md5(open(filename, "rb").read()).hexdigest()
print "Your OAuth checksum is: ", checksum
On Sep 7, 1:39 pm, Bill Freeman <ke1g...@gmail.com> wrote:
> Why not check which version of oauth you have in each place?
>
> Even if there isn't a usable version indicator in the library, you could
> generate a file containing the chacksums of all the py files, sort it, and
> compare it.
>
> On Tue, Sep 7, 2010 at 4:46 AM, Chris <macmichae...@gmail.com> wrote:
> > So I wrote some django unit tests for an app that uses OAuth and I ran
> > into this strange issue when attempting to set my verifier:
>
> > On my local dev machine it likes me to set my verifier like so:
> > token.set_verifier(verifier)
>
> > On my production machine it like me to set my verifier like so:
> > oauth_request = oauth.OAuthRequest.from_consumer_and_token(
> > self.apicall.consumer,
> > token=token,
> > verifier=verifier,
> > http_url=self.apicall.access_token_url
> > )
>
> > Both my dev machine and production machine can't agree on which way
> > they would like to set the verifier. If I perform both methods, then
> > both dev and production seem to be happy! Why is this? Could I have a
> > slightly different version of oauth on both the machines?
>
> > Here is the full snippet of code that sets the verifier and makes the
> > access token request:
>
> > verifier = "zNd4KsqnL9"
> > # Dev likes it this way
> > token.set_verifier(verifier)
>
> > oauth_request = oauth.OAuthRequest.from_consumer_and_token(
> > self.apicall.consumer,
> > token=token,
> > # prod likes it this way
> > verifier=verifier,
> > http_url=self.apicall.access_token_url
> > )
> > oauth_request.sign_request(self.apicall.signature_method,
> > self.apicall.consumer, token
> > )
> > params = oauth_request.parameters
> > response = self.client.get(self.apicall.access_token_url,
> > params)
>
> > --
> > You received this message because you are subscribed to the Google Groups "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment