#NEWLINE# def test_create_environment( self ) : #NEWLINE# #INDENT# url = reverse ( 'environment-list' ) #NEWLINE# data = { #NEWLINE# #INDENT# 'name' : 'test-env' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( url , data , format = 'json' ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_201_CREATED ) #NEWLINE# self . assertEqual ( response . data [ 'name' ] , 'test-env' ) #NEWLINE# self . assertEqual ( Environment . objects . count ( ) , 3 )