import unittest

from mo.runner import Variable


class TestVariable(unittest.TestCase):
    def test_default(self):
        v = Variable('name', {'default': 'default'})
        self.assertEqual(v.value, 'default')
        self.assertEqual(str(v), 'default')

    def test_value(self):
        v = Variable('name', {'default': 'default'}, 'value')
        self.assertEqual(v.value, 'value')
        self.assertEqual(str(v), 'value')

    def test_str(self):
        v = Variable('name', {'default': 'abc'})
        self.assertEqual(str(v), v.value)

import unittest

from mo.runner import Task, Variable


class TestVariable(unittest.TestCase):
    def test_default(self):
        v = Variable('name', {'default': 'default'})
        self.assertEqual(v.value, 'default')
        self.assertEqual(str(v), 'default')

    def test_value(self):
        v = Variable('name', {'default': 'default'}, 'value')
        self.assertEqual(v.value, 'value')
        self.assertEqual(str(v), 'value')

    def test_str(self):
        v = Variable('name', {'default': 'abc'})
        self.assertEqual(str(v), v.value)


class TestTask(unittest.TestCase):
    def test_variables(self):
        t = Task('name', {'description': '', 'command': '{{ v }}'},
                 {'v': 'variable'})
        self.assertEqual(t.commands[0], 'variable')

Add some more tests for tasks
Add some more tests for tasks
