示例#1
0
#!/usr/bin/env python
from gevent.monkey import patch_all; patch_all()
from gevent.wsgi import WSGIServer
import os
import sys
import pypi_notifier
app = pypi_notifier.create_app(sys.argv[1])
http_server = WSGIServer(('0.0.0.0', int(os.environ.get("PORT", 5000))), app)
http_server.serve_forever()
示例#2
0
 def setUp(self):
     self.app = create_app("testing")
     self.client = self.app.test_client()
     self._ctx = self.app.test_request_context()
     self._ctx.push()
     db.create_all()
示例#3
0
 def setUp(self):
     self.app = create_app("testing")
     self.client = self.app.test_client()
     self._ctx = self.app.test_request_context()
     self._ctx.push()
     db.create_all()
示例#4
0
                    db.session.delete(g.user)
                    db.session.commit()
                return render_template('unsubscribed.html')
            else:
                return redirect(url_for('index'))
        return render_template('unsubscribe-confirm.html')


########NEW FILE########
__FILENAME__ = run_gevent
#!/usr/bin/env python
from gevent.monkey import patch_all
patch_all()
from gevent.wsgi import WSGIServer
from pypi_notifier import create_app
app = create_app('ProductionConfig')
http_server = WSGIServer(('0.0.0.0', 5001), app)
http_server.serve_forever()

########NEW FILE########
__FILENAME__ = test
import unittest

from mock import patch
from flask.ext.github import GitHub

from pypi_notifier import create_app, db
from pypi_notifier.models import User, Repo, Requirement, Package
from pypi_notifier.config import TestingConfig

示例#5
0
            if request.form['confirm'] == 'yes':
                if g.user:
                    db.session.delete(g.user)
                    db.session.commit()
                return render_template('unsubscribed.html')
            else:
                return redirect(url_for('index'))
        return render_template('unsubscribe-confirm.html')

########NEW FILE########
__FILENAME__ = run_gevent
#!/usr/bin/env python
from gevent.monkey import patch_all; patch_all()
from gevent.wsgi import WSGIServer
from pypi_notifier import create_app
app = create_app('ProductionConfig')
http_server = WSGIServer(('0.0.0.0', 5001), app)
http_server.serve_forever()

########NEW FILE########
__FILENAME__ = test
import unittest

from mock import patch
from flask.ext.github import GitHub

from pypi_notifier import create_app, db
from pypi_notifier.models import User, Repo, Requirement, Package
from pypi_notifier.config import TestingConfig

示例#6
0
#!/usr/bin/env python
from gevent.monkey import patch_all

patch_all()
from gevent.wsgi import WSGIServer
import os
import sys
import pypi_notifier

app = pypi_notifier.create_app(sys.argv[1])
http_server = WSGIServer(('0.0.0.0', int(os.environ.get("PORT", 5000))), app)
http_server.serve_forever()