def test_ugettext_calls():
 runtime = TestRuntime()
 block = XBlockWithServices(runtime, scope_ids=Mock(spec=[]))
 assert_equals(block.ugettext('test'), u'test')
 assert_true(isinstance(block.ugettext('test'), unicode))
 runtime = TestRuntime(services={'i18n': None})
 block = XBlockWithServices(runtime, scope_ids=Mock(spec=[]))
 with assert_raises(NoSuchServiceError):
  block.ugettext('test')

def test_ugettext_calls ( ) : runtime = TestRuntime ( ) block = XBlockWithServices ( runtime , scope_ids = Mock ( spec = [ ] ) ) assert_equals ( block . ugettext ( 'test' ) , u'test' ) assert_true ( isinstance ( block . ugettext ( 'test' ) , unicode ) ) runtime = TestRuntime ( services = { 'i18n' : None } ) block = XBlockWithServices ( runtime , scope_ids = Mock ( spec = [ ] ) ) with assert_raises ( NoSuchServiceError ) : block . ugettext ( 'test' )
test ugettext calls in xblock .