# Path: greenpithumb/soil_moisture_sensor.py
# class SoilMoistureSensor(object):
#     def __init__(self, adc, pi_io, channel, gpio_pin):
#     def soil_moisture(self):


import collections
import unittest
import mock
from greenpithumb import soil_moisture_sensor




class MoistureSensorTest(unittest.TestCase):

    def setUp(self):
        self.mock_adc = mock.Mock()
        self.pin_state = collections.defaultdict(lambda: False)

        def mock_turn_pin_on(pin):
            self.pin_state[pin] = True

        def mock_turn_pin_off(pin):
            self.pin_state[pin] = False

        self.mock_pi_io = mock.Mock()

# Path: greenpithumb/soil_moisture_sensor.py
# class SoilMoistureSensor(object):
#     def __init__(self, adc, pi_io, channel, gpio_pin):
#     def soil_moisture(self):


# Path: tests/test_soil_moisture_sensor.py
import collections
import unittest
import mock
from greenpithumb import soil_moisture_sensor





class MoistureSensorTest(unittest.TestCase):

    def setUp(self):
        self.mock_adc = mock.Mock()
        self.pin_state = collections.defaultdict(lambda: False)

        def mock_turn_pin_on(pin):
            self.pin_state[pin] = True

        def mock_turn_pin_off(pin):
            self.pin_state[pin] = False

        self.mock_pi_io = mock.Mock()

        self.mock_pi_io.turn_pin_on.side_effect = mock_turn_pin_on