'Check for a valid UNIX timestamp.'

def test_oauth_timestamp(self):

    v = RequestValidator()
    e = BaseEndpoint(v)
    r = e._create_request(u'https://a.b/', u'GET', u'oauth_signature=a&oauth_consumer_key=b&oauth_nonce=c&oauth_version=1.0&oauth_signature_method=RSA-SHA1&oauth_timestamp=123456789', URLENCODED)
    self.assertRaises(errors.InvalidRequestError, e._check_mandatory_parameters, r)
    r = e._create_request(u'https://a.b/', u'GET', u'oauth_signature=a&oauth_consumer_key=b&oauth_nonce=c&oauth_version=1.0&oauth_signature_method=RSA-SHA1&oauth_timestamp=1234567890', URLENCODED)
    self.assertRaises(errors.InvalidRequestError, e._check_mandatory_parameters, r)
    r = e._create_request(u'https://a.b/', u'GET', u'oauth_signature=a&oauth_consumer_key=b&oauth_nonce=c&oauth_version=1.0&oauth_signature_method=RSA-SHA1&oauth_timestamp=123456789a', URLENCODED)
    self.assertRaises(errors.InvalidRequestError, e._check_mandatory_parameters, r)
