Example #1
0
 def test_LocationFactory_fromString(self):
     from niprov.locationfactory import LocationFactory
     with patch('niprov.locationfactory.Location') as Location:
         factory = LocationFactory()
         out = factory.fromString('abc')
         Location.assert_called_with('abc')
         self.assertEqual(Location(), out)
Example #2
0
 def test_LocationFactory_fromString(self):
     from niprov.locationfactory import LocationFactory
     with patch('niprov.locationfactory.Location') as Location:
         factory = LocationFactory()
         out = factory.fromString('abc')
         Location.assert_called_with('abc')
         self.assertEqual(Location(), out)
Example #3
0
 def test_LocationFactory_completeString(self):
     from niprov.locationfactory import LocationFactory
     with patch('niprov.locationfactory.Location') as Location:
         factory = LocationFactory()
         factory.fromString = Mock()
         outstr = factory.completeString('/j/k/l')
         factory.fromString.assert_called_with('/j/k/l')
         self.assertEqual(str(factory.fromString()), outstr)
Example #4
0
 def test_LocationFactory_completeString(self):
     from niprov.locationfactory import LocationFactory
     with patch('niprov.locationfactory.Location') as Location:
         factory = LocationFactory()
         factory.fromString = Mock()
         outstr = factory.completeString('/j/k/l')
         factory.fromString.assert_called_with('/j/k/l')
         self.assertEqual(str(factory.fromString()), outstr)