Example #1
0
    def __init__(self, name):
        self.config = ConfigParser.ConfigParser()
        config_path = os.path.join(os.getcwd(), "moot/config.ini")
        self.config.read(config_path)

        self.name = name
        self.logger = get_logger(self.name)
Example #2
0
    def __init__(self, name):
        self.config = ConfigParser.ConfigParser()
        config_path = os.path.join(os.getcwd(), "moot/config.ini")
        self.config.read(config_path)

        self.name = name
        self.logger = get_logger(self.name)
Example #3
0
    def setUp(self):
        self.config = ConfigParser.ConfigParser()
        config_path = os.path.join(os.getcwd(), "config.ini")
        self.config.read(config_path)

        self.hostname = self.config.get('server', 'hostname')
        self.rest_prefix = self.config.get('server', 'rest_prefix')
        self.user_id = self.config.get('mootapp', 'test_user_id')
        self.password = self.config.get('mootapp', 'moot_password')
        self.TEST_UPC = '0746775167813'
        self.bad_status = "failure"
        self.good_status = "success"

        self.logger = get_logger(__name__, isTestFile=True)

        self.test_login()
Example #4
0
    def setUp(self):
        self.config = ConfigParser.ConfigParser()
        config_path = os.path.join(os.getcwd(), "config.ini")
        self.config.read(config_path)

        self.hostname = self.config.get('server', 'hostname')
        self.rest_prefix = self.config.get('server', 'rest_prefix')
        self.user_id = self.config.get('mootapp', 'test_user_id')
        self.password = self.config.get('mootapp', 'moot_password')
        self.TEST_UPC = '0746775167813'
        self.bad_status = "failure"
        self.good_status = "success"

        self.logger = get_logger(__name__, isTestFile=True)

        self.test_login()
Example #5
0
from PIL import Image
import math
from math import sqrt
import random
from random import shuffle
from StringIO import StringIO
import pdb
from collections import namedtuple, Counter
from colorama import init, Fore, Back, Style
from colorthief import ColorThief
import colorsys

config = ConfigParser.ConfigParser()
config_path = os.path.join(os.getcwd(), "moot/config.ini")
config.read(config_path)
logger = get_logger(__name__)

HOSTNAME = config.get('server', 'hostname')
REST_PREFIX = config.get('server', 'rest_prefix')

SEARCH_UPC_URL = config.get('api', 'search_upc_url')
UPC_REQUEST_TYPE = config.get('api', 'upc_request_type')
UPC_ACCESS_TOKEN = config.get('api', 'upc_access_token')
WORDNIK_URL = config.get('api', 'wordnik_url')
WORDNIK_API_KEY = config.get('api', 'wordnik_api_key')
QR_CODE_URL = config.get('api', 'qr_code_url')

MAX_POINTS_FOR_PRODUCT = 101
SUCCESS = "success"
FAILURE = "failure"
Example #6
0
from __future__ import absolute_import

from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop

from moot.game import app
from moot.moot_logger import get_logger

logger = get_logger("server")

http_server = HTTPServer(WSGIContainer(app))
http_server.listen(5000)
logger.info('Starting server')
IOLoop.instance().start()




Example #7
0
from PIL import Image
import math
from math import sqrt
import random
from random import shuffle
from StringIO import StringIO
import pdb
from collections import namedtuple, Counter
from colorama import init, Fore, Back, Style
from colorthief import ColorThief
import colorsys

config = ConfigParser.ConfigParser()
config_path = os.path.join(os.getcwd(), "moot/config.ini")
config.read(config_path)
logger = get_logger(__name__)

HOSTNAME = config.get('server', 'hostname')
REST_PREFIX = config.get('server', 'rest_prefix')

SEARCH_UPC_URL = config.get('api', 'search_upc_url')
UPC_REQUEST_TYPE = config.get('api', 'upc_request_type')
UPC_ACCESS_TOKEN = config.get('api', 'upc_access_token')
WORDNIK_URL = config.get('api', 'wordnik_url')
WORDNIK_API_KEY = config.get('api', 'wordnik_api_key')
QR_CODE_URL = config.get('api', 'qr_code_url')

MAX_POINTS_FOR_PRODUCT = 101
SUCCESS = "success"
FAILURE = "failure"