# -*- coding: utf-8 -*-
import bot_mock
from pyfibot.modules import module_openweather
from utils import check_re


bot = bot_mock.BotMock()


def test_weather():
    regex = u'Lappeenranta, FI: Temperature: \d+.\d\xb0C, feels like: \d+.\d\xb0C, wind: \d+.\d m/s, humidity: \d+%, pressure: \d+ hPa, cloudiness: \d+%'
    check_re(regex, module_openweather.command_weather(bot, None, "#channel", 'lappeenranta')[1])


def test_forecast():
    regex = u'Lappeenranta, Finland: tomorrow: \d+.\d-\d+.\d \xb0C \(.*?\), in 2 days: \d+.\d-\d+.\d \xb0C \(.*?\), in 3 days: \d+.\d-\d+.\d \xb0C \(.*?\)'
    check_re(regex, module_openweather.command_forecast(bot, None, "#channel", 'lappeenranta')[1])

# -*- coding: utf-8 -*-
import bot_mock
from pyfibot.modules import module_openweather
from utils import check_re


bot = bot_mock.BotMock()


def test_weather():
    regex = u'Lappeenranta, FI: Temperature: \d+.\d\xb0C, feels like: \d+.\d\xb0C, wind: \d+.\d m/s, humidity: \d+%, pressure: \d+ hPa, cloudiness: \d+%'
    check_re(regex, module_openweather.command_weather(bot, None, "#channel", 'lappeenranta')[1])


def test_forecast():
    regex = u'Lappeenranta, FI: tomorrow: \d+.\d-\d+.\d \xb0C \(.*?\), in 2 days: \d+.\d-\d+.\d \xb0C \(.*?\), in 3 days: \d+.\d-\d+.\d \xb0C \(.*?\)'
    check_re(regex, module_openweather.command_forecast(bot, None, "#channel", 'lappeenranta')[1])

Revert "Fix openweather unit tests"
Revert "Fix openweather unit tests"

This reverts commit 36e100e649f0a337228a6d7375358d23afd544ff.

Open Weather Map has reverted back to their old api or something like that...
