Commits

Dmitri Lebedev  committed 2977426 Draft

more tests

  • Participants
  • Parent commits 6ecb466
  • Branches search-refactoring

Comments (0)

Files changed (1)

File fsquass/tests.py

 
 from fsquass import Fs, File, Dir, escaped_split
 from unittest import TestCase
-from mock import patch, Mock
+from mock import patch
 import logging
 import os
-#import ipdb;ipdb.set_trace()
+
 
 struct = {
 	'home': {
 		walker('/', struct)
 
 
-class NewTestsCase(TestCase):
-	def test_new_funcs(self):
+class NewTestsCase(MockMixin, TestCase):
+	def test_new_search_funcs(self):
 		self.assertEqual(Fs([Dir('/')])._nested_find(['home', 'siberiano']), Fs('/home/siberiano'))
 		self.assertEqual(Fs([Dir('/home')])._nested_find(['..', 'tmp']), Fs('/tmp'))
-
+		source = Fs([File('/home'), File('/tmp')])
+		target = Fs([File('/home/siberiano'), File('/tmp/siberiano')])
+		self.assertEqual(source._nested_find(['siberiano']), target)