def _get_django_vars():
 import re
 from django.test.testcases import TransactionTestCase
 camelcase = re.compile(u'([a-z][A-Z]|[A-Z][a-z])')
 def insert_underscore(m):
  u'Insert an appropriate underscore into the name.'
  (a, b) = m.group(0)
  if b.islower():
   return u'_{}{}'.format(a, b)
  else:
   return u'{}_{}'.format(a, b)
 def pep8(name):
  u'Replace camelcase name with PEP8 equivalent.'
  return str(camelcase.sub(insert_underscore, name).lower())
 class Dummy(TransactionTestCase, ):
  u'A dummy test case for gathering current assertion helpers.'
  def nop():
   u'A dummy test to get an initialized test case.'
   pass
 dummy_test = Dummy(u'nop')
 new_names = {}
 for assert_name in [at for at in dir(dummy_test) if (at.startswith(u'assert') and (u'_' not in at))]:
  pepd = pep8(assert_name)
  new_names[pepd] = getattr(dummy_test, assert_name)
 return new_names

def _get_django_vars ( ) : import re from django . test . testcases import TransactionTestCase camelcase = re . compile ( u'([a-z][A-Z]|[A-Z][a-z])' ) def insert_underscore ( m ) : ( a , b ) = m . group ( 0 ) if b . islower ( ) : return u'_{}{}' . format ( a , b ) else : return u'{}_{}' . format ( a , b ) def pep8 ( name ) : return str ( camelcase . sub ( insert_underscore , name ) . lower ( ) ) class Dummy ( TransactionTestCase , ) : def nop ( ) : pass dummy_test = Dummy ( u'nop' ) new_names = { } for assert_name in [ at for at in dir ( dummy_test ) if ( at . startswith ( u'assert' ) and ( u'_' not in at ) ) ] : pepd = pep8 ( assert_name ) new_names [ pepd ] = getattr ( dummy_test , assert_name ) return new_names
collect assert_* methods from djangos transactiontestcase .