'''
Test the salt mine system
'''
import integration

class MineTest(integration.ModuleCase):
    '''
    Test the mine system
    '''
    def test_get(self):
        '''
        test mine.get and mine.update
        '''
        self.assertTrue(self.run_function('mine.update'))
        self.assertTrue(self.run_function('mine.get', ['minion', 'test.ping']))

    def test_send(self):
        '''
        test mine.send
        '''
        self.assertFalse(self.run_function('mine.send', ['foo.__spam_and_cheese']))
        self.assertTrue(self.run_function('mine.send', ['test.retcode']))
        self.assertTrue(self.run_function('mine.get', ['minion', 'test.retcode']))

@@ -269,16 +269,37 @@
 .update'
+, minion_tgt='minion'
 ))%0A     
@@ -309,32 +309,49 @@
 self.assertTrue(
+%0A                
 self.run_functio
@@ -356,44 +356,302 @@
 ion(
-'mine.get', %5B'minion', 'test.ping'%5D)
+%0A                    'mine.update',%0A                    minion_tgt='sub_minion'%0A                    )%0A                )%0A        self.assertTrue(%0A                self.run_function(%0A                    'mine.get',%0A                    %5B'minion', 'test.ping'%5D%0A                    )%0A                
 )%0A%0A 
@@ -746,16 +746,33 @@
 rtFalse(
+%0A                
 self.run
@@ -785,47 +785,126 @@
 ion(
-'mine.send', %5B'foo.__spam_and_cheese'%5D)
+%0A                    'mine.send',%0A                    %5B'foo.__spam_and_cheese'%5D%0A                    )%0A                
 )%0A  
@@ -917,32 +917,49 @@
 self.assertTrue(
+%0A                
 self.run_functio
@@ -964,119 +964,810 @@
 ion(
-'mine.send', %5B'test.retcode'%5D))%0A        self.assertTrue(self.run_function('mine.get', %5B'minion', 'test.retcode'%5D)
+%0A                    'mine.send',%0A                    %5B'grains.items'%5D,%0A                    minion_tgt='minion',%0A                    )%0A                )%0A        self.assertTrue(%0A                self.run_function(%0A                    'mine.send',%0A                    %5B'grains.items'%5D,%0A                    minion_tgt='sub_minion',%0A                    )%0A                )%0A        ret = self.run_function(%0A                    'mine.get',%0A                    %5B'sub_minion', 'grains.items'%5D%0A                    )%0A        self.assertEqual(ret%5B'sub_minion'%5D%5B'id'%5D, 'sub_minion')%0A        ret = self.run_function(%0A                    'mine.get',%0A                    %5B'minion', 'grains.items'%5D,%0A                    minion_tgt='sub_minion'%0A                    )%0A        self.assertEqual(ret%5B'minion'%5D%5B'id'%5D, 'minion'
 )%0A

Add tests to check cross minion validity in the mine