#NEWLINE# def test_create_invalid_sreg( self ) : #NEWLINE# #INDENT# test_data = json . loads ( '{\n            "hwadapters-TOTAL_FORMS": ["1"],\n            "hwadapters-MAX_NUM_FORMS": [""],\n            "hwadapters-INITIAL_FORMS": ["0"],\n            "sreg-views": ["2"],\n            "sreg-fqdn": ["this.machine.dont.exist.mozilla.com"],\n            "sreg-ip_str": ["10.8.101.217"],\n            "kv-sreg-name": ["foo"],\n            "override-fqdn": ["on"],\n            "sreg-system": ["6112"],\n            "hwadapters-0-name": ["nic0"],\n            "hwadapters-0-mac": ["11:22:33:44:55:66"],\n            "kv-hwadapters-0-hostname": ["valid.mozilla.com"]}\n        ' ) #NEWLINE# sreg_count_before = StaticReg . objects . all ( ) . count ( ) #NEWLINE# hw_count_before = HWAdapter . objects . all ( ) . count ( ) #NEWLINE# resp = self . client . post ( '/en-US/core/registration/static/create/' , hw_count_before ) #NEWLINE# self . assertEqual ( 200 , resp . status_code ) #NEWLINE# sreg_count_after = StaticReg . objects . all ( ) . count ( ) #NEWLINE# hw_count_after = HWAdapter . objects . all ( ) . count ( ) #NEWLINE# self . assertEqual ( sreg_count_before , sreg_count_after ) #NEWLINE# self . assertEqual ( hw_count_before , hw_count_after )