How to use is_not_equal_to method in assertpy

Best Python code snippet using assertpy_python

phy_exam_constants.py

Source:phy_exam_constants.py Github

copy

Full Screen

1################################################################################2# Physical Examination and Validation Constants for AuShadha.3# These Provide Default constants4################################################################################5# Author : Dr.Easwar T.R6# Copyright : 20127# Date : 2013-09-078# Licence : GNU-GPL Version 39################################################################################10# PHYSICAL EXAMINATION CONSTANTS FOR VALIDATION IN PRESENTATION CLASSES11EXAMINATION_SIDES = (('R', "Right"), ("L", "Left"), ("B/L", "Bilateral"))12INCIDENT_TYPES = (13 ('drug_related', "Drug Related"),14 ("procedure_related",15 "Procedure Related" ),16 ("anaesthesia_related",17 "Anaesthesia Related" ),18 ("others", "Others"),19)20# SYS EXAM NORMALS21HEENT_EX = "No abnormality detected in Head/ Eye/ Ear/ Nose/ Throat and Neck Exam"22CNS_EX = """23Higher functions normal. GCS 15/ 15.\n24No cranial nerve palsy.\n25No Motor or Sensory Deficit.\n26Deep and Superficial reflexes normal.\n27"""28CVS_EX = """29Heart sounds normal.\n30Carotid pulsations well felt on both sides.\n31Peripheral pulses well felt on all four limbs.\n32"""33RESP_EX = """34Air entry equal on both sides.\n35No abnormal breath sounds.\n36Normal Percussion findings. \n37No tenderness in chest wall.\n38"""39GIT_GUT_EX = """40Abdomen soft and non-tender in all four quadrants.\n41No organomegaly.\n42No abnormal mass palpable.\n43No free fluid or dilated veins.\n44No renal angle tenderness or impulse on cough.\n45No abnormal findings in External genitalia\n46No Inguinal Lymphadenopathy.\n47"""48# REGIONAL EXAM NORMALS49NORM_LIMB_INS = """50Attitude of limbs normal on both sides.\n51No wasting or apparent Limb length inequality observed.\n52No Apparent deformity, swelling, wounds or discharge noted.\n53"""54NORM_LIMB_PALP = """55No joint line or spinal tenderness, swelling or local warmth noted.\n56No spasm on attempted movements.\n57No abnormal joint laxity or deformity noted.\n58ASIS and shoulders at the same level.\n59Spine profile WNL. No Scoliosis or other deformity noted clinically.\n60No apparent / true limb length inequality.\n61Limb alignment normal.\n62"""63NORM_GAIT = """64Gait unassisted and stable.\n65No limp / lurch.\n66Trendlenberg test negative.\n67"""68NORM_ROM = """69Full range of movements of all joints and spine.No fixed deformity.\n70No Pain, spasm / crepitus on movements.\n71No soft tissue contracture.\n72"""73NEURO_EXAM={74 'plantar': "Bilateral Flexor response",75 'abdominal':"Ellicited well in all four quadrants",76 "cremasteric":"Present",77 "anal_wink":"Present",78 "motor": "Normal Bulk, Tone and Power in all four limbs. No Fasciculations",79 "sensory": "Normal Sensation in all four limbs. Perianal sensation intact",80 "dtr" : "Equally ellicitable in all four limbs. No Clonus",81 "cranial_nerve" :"All Cranial Nerves NAD"82 }83MUSCULOSKELETAL_EXAM = {84 "ms_exam": "NAD"85}86CONSULT_CHOICES = (87 ('initial', 'Initial' ),88 ('fu', 'Follow-Up'),89 ('pre_op', 'Pre-Op'),90 ('post_op', 'Post-OP'),91 ('discharge', 'Discharge')92)93PC = {94 'visit_ros': {95 'const_symp': {'default':"Nil",96 'constraints':{},97 'validator':'is_not_equal_to',98 'label' :'Constitutional Symptoms',99 'unit' :'',100 'delimitter':''101 },102 'eye_symp': {'default':"Nil",103 'constraints':{},104 'validator':'is_not_equal_to',105 'label' :'Eye Symptoms',106 'unit' :'',107 'delimitter':''108 },109 'ent_symp': {'default':"Nil",110 'constraints':{},111 'validator':'is_not_equal_to',112 'label' :'ENT Symptoms',113 'unit' :'',114 'delimitter':''115 },116 'cvs_symp': {'default':"Nil",117 'constraints':{},118 'validator':'is_not_equal_to',119 'label' :'Cardiovascular Symptoms',120 'unit' :'',121 'delimitter':''122 },123 'resp_symp': {'default':"Nil",124 'constraints':{},125 'validator':'is_not_equal_to',126 'label' :'Respiratory Symptoms',127 'unit' :'',128 'delimitter':''129 },130 'gi_symp': {'default':"Nil",131 'constraints':{},132 'validator':'is_not_equal_to',133 'label' :'Gastro-Intestinal Symptoms',134 'unit' :'',135 'delimitter':''136 },137 'gu_symp': {'default':"Nil",138 'constraints':{},139 'validator':'is_not_equal_to',140 'label' :'Genitourinary Symptoms',141 'unit' :'',142 'delimitter':''143 },144 'integ_symp': {'default':"Nil",145 'constraints':{},146 'validator':'is_not_equal_to',147 'label' :'Integumentary /Breast Symptoms',148 'unit' :'',149 'delimitter':''150 },151 'neuro_symp': {'default':"Nil",152 'constraints':{},153 'validator':'is_not_equal_to',154 'label' :'Neurological Symptoms',155 'unit' :'',156 'delimitter':''157 },158 'psych_symp': {'default':"Nil",159 'constraints':{},160 'validator':'is_not_equal_to',161 'label' :'Psychiatric Symptoms',162 'unit' :'',163 'delimitter':''164 },165 'endocr_symp': {'default':"Nil",166 'constraints':{},167 'validator':'is_not_equal_to',168 'label' :'Endocrine Symptoms',169 'unit' :'',170 'delimitter':''171 },172 'hemat_symp': {'default':"Nil",173 'constraints':{},174 'validator':'is_not_equal_to',175 'label' :'Hematological Symptoms',176 'unit' :'',177 'delimitter':''178 },179 'immuno_symp': {'default':"Nil",180 'constraints':{},181 'validator':'is_not_equal_to',182 'label' :'Immunologic Symptoms',183 'unit' :'',184 'delimitter':''185 }186 },187 'vital':{'sys_bp': {'default':120,188 'constraints':{'max':150,'min':90},189 'validator':'is_in_range',190 'label' :'Systolic BP',191 'unit' :'mmHg',192 'delimitter':'/'193 },194 'dia_bp': {'default':80,195 'constraints':{'max':90,'min':70},196 'validator':'is_in_range',197 'label' :'Diastolic BP', 198 'unit' :'mmHg',199 'delimitter':'/'200 },201 'pulse_rate': {'default':80,202 'constraints':{'max':100,'min':70},203 'validator':'is_in_range',204 'label' :'Pulse Rate', 205 'unit' :'per min.',206 'delimitter':' '207 },208 'resp_rate': {'default':20,209 'constraints':{'max':28,'min':18},210 'validator':'is_in_range',211 'label' :'Respiratory Rate', 212 'unit' :'per min.',213 'delimitter':':'214 },215 'gcs': {'default':15,216 'constraints':{'max':15,'min':15},217 'validator':'is_in_range',218 'label' :'GCS', 219 'unit' :'15',220 'delimitter':'/'221 },222 'height': {'default':0,223 'constraints':{},224 'validator':None,225 'label' :'Height', 226 'unit' :'Cms.',227 'delimitter':':'228 },229 'weight': {'default':0,230 'constraints':{},231 'validator':None,232 'label' :'Weight', 233 'unit' :'Kg.',234 'delimitter':':'235 },236 'bmi': {'default':25.00,237 'constraints':{'max':28.00,'min':22.00},238 'validator':'is_in_range',239 'label' :'BMI', 240 'unit' :' ',241 'delimitter':''242 },243 'temp': {'default':98.40,244 'constraints':{'max':120.0,'min':90.00},245 'validator':'is_in_range',246 'label' :'Temparature', 247 'unit' :'Farenheit',248 'delimitter':' '249 },250 'remarks': {'default':"NAD",251 'constraints':{},252 'validator':'is_not_equal_to',253 'label' :'Remarks', 254 'unit' :' ',255 'delimitter':':'256 }257 },258 'gen':{'pallor':{'default':False,259 'constraints':{},260 'validator':'is_true_or_false',261 'label' :'Pallor', 262 'unit' :' ',263 'delimitter':':'264 },265 'icterus': {'default':False,266 'constraints':{},267 'validator':'is_true_or_false',268 'label' :'Icterus', 269 'unit' :' ',270 'delimitter':':'271 },272 'cyanosis': {'default':False,273 'constraints':{},274 'validator':'is_true_or_false',275 'label' :'Cyanosis', 276 'unit' :' ',277 'delimitter':':'278 },279 'lymphadenopathy': {'default':False,280 'constraints':{},281 'validator':'is_true_or_false',282 'label' :'Lymphadenopathy', 283 'unit' :' ',284 'delimitter':':'285 },286 'clubbing': {'default':False,287 'constraints':{},288 'validator':'is_true_or_false',289 'label' :'Clubbing', 290 'unit' :' ',291 'delimitter':':'292 },293 'edema': {'default':False,294 'constraints':{},295 'validator':'is_true_or_false',296 'label' :'Edema', 297 'unit' :' ',298 'delimitter':':'299 },300 'remarks': {'default':"NAD",301 'constraints':{},302 'validator':'is_not_equal_to',303 'label' :'Remarks', 304 'unit' :' ',305 'delimitter':''306 }307 },308 'sys':{ 309 'heent': {'default':HEENT_EX,310 'constraints':{},311 'validator':'is_not_equal_to',312 'label' :'HEENT Examination', 313 'unit' :' ',314 'delimitter':''315 },316 'cns': {'default':CNS_EX,317 'constraints':{},318 'validator':'is_not_equal_to',319 'label' :'Central Nervous Examination', 320 'unit' :' ',321 'delimitter':''322 },323 324 'cvs': {'default':CVS_EX,325 'constraints':{},326 'validator':'is_not_equal_to',327 'label' :'Cardio-Vascular Examination', 328 'unit' :' ',329 'delimitter':''330 },331 'respiratory_system': {'default':RESP_EX,332 'constraints':{},333 'validator':'is_not_equal_to',334 'label' :'Respiratory System Examination', 335 'unit' :' ',336 'delimitter':''337 },338 'git_and_gut': {'default':GIT_GUT_EX,339 'constraints':{},340 'validator':'is_not_equal_to',341 'label' :'GastroIntestinal & Genitourinary System Examination', 342 'unit' :' ',343 'delimitter':''344 },345 },346 'neuro':{347 'plantar': {'default':NEURO_EXAM['plantar'],348 'constraints':{},349 'validator':'is_not_equal_to',350 'label' :'Plantar Reflex', 351 'unit' :' ',352 'delimitter':''353 },354 'cremasteric': {'default':NEURO_EXAM['cremasteric'],355 'constraints':{},356 'validator':'is_not_equal_to',357 'label' :'Cremasteric Reflex', 358 'unit' :' ',359 'delimitter':''360 },361 'abdominal': {'default':NEURO_EXAM['abdominal'],362 'constraints':{},363 'validator':'is_not_equal_to',364 'label' :'Abdominal Reflexes', 365 'unit' :' ',366 'delimitter':''367 },368 'anal_wink': {'default':NEURO_EXAM['anal_wink'],369 'constraints':{},370 'validator':'is_not_equal_to',371 'label' :'Anal Wink', 372 'unit' :' ',373 'delimitter':''374 },375 'motor': {'default':NEURO_EXAM['motor'],376 'constraints':{},377 'validator':'is_not_equal_to',378 'label' :'Motor Examination', 379 'unit' :' ',380 'delimitter':''381 },382 'sensory': {'default':NEURO_EXAM['sensory'],383 'constraints':{},384 'validator':'is_not_equal_to',385 'label' :'Sensory Examination', 386 'unit' :' ',387 'delimitter':''388 },389 'dtr': {'default':NEURO_EXAM['dtr'],390 'constraints':{},391 'validator':'is_not_equal_to',392 'label' :'Deep Reflexes', 393 'unit' :' ',394 'delimitter':''395 },396 'cranial_nerve': {'default':NEURO_EXAM['cranial_nerve'],397 'constraints':{},398 'validator':'is_not_equal_to',399 'label' :'Cranial Nerve', 400 'unit' :' ',401 'delimitter':''402 }403 },404 'musculoskeletal':{405 'ms_exam': {'default':MUSCULOSKELETAL_EXAM['ms_exam'],406 'constraints':{},407 'validator':'is_not_equal_to',408 'label' :'Findings',409 'unit' :' ',410 'delimitter':''411 }412 },413 'vasc':{414 'location': {'default':['DP','PT','P','F','R','U','B','A','SC','C'],415 'constraints':{},416 'validator':'in_list',417 'label' :'Location', 418 'unit' :' ',419 'delimitter':''420 },421 'side': {'default':['R','L','B'],422 'constraints':{},423 'validator':'in_list',424 'label' :'Side', 425 'unit' :' ',426 'delimitter':''427 },428 'character': {'default':'normal',429 'constraints':{},430 'validator':'is_not_equal_to',431 'label' :'Character', 432 'unit' :' ',433 'delimitter':''434 },435 },436 'obstetric_exam':{},437 'gynaecological_exam':{},438 'neonatal_exam':{},439 'paediatric_exam':{},440 'cardiac_exam':{},441 'musculoskeletal_exam':{},...

Full Screen

Full Screen

test_diagram.py

Source:test_diagram.py Github

copy

Full Screen

...43 )44 assert_that(result).contains_key("")45 assert_that(result[""]).is_length(6)46 for resource in result[""]:47 assert_that(resource.digest).is_not_equal_to(subnet_1_digest)48 assert_that(resource.digest).is_not_equal_to(subnet_2_digest)49 relationships = sut.process_relationships(result, relations)50 assert_that(relationships).is_length(8)51 assert_that(relationships).contains(52 ResourceEdge(53 from_node=ResourceDigest(id=PUBLIC_SUBNET, type="aws_subnet"),54 to_node=vpc_digest,55 )56 )57 assert_that(relationships).contains(58 ResourceEdge(from_node=route_digest, to_node=vpc_digest)59 )60 assert_that(relationships).contains(61 ResourceEdge(62 from_node=ec2_1_digest,63 to_node=ResourceDigest(id=PUBLIC_SUBNET, type="aws_subnet"),64 )65 )66 assert_that(relationships).contains(67 ResourceEdge(68 from_node=ec2_2_digest,69 to_node=ResourceDigest(id=PUBLIC_SUBNET, type="aws_subnet"),70 )71 )72 def test_private_subnet(self):73 sut = VpcDiagram("3")74 subnet_digest = ResourceDigest(id="1", type="aws_subnet")75 route_digest = ResourceDigest(id="2", type="aws_route_table")76 vpc_digest = ResourceDigest(id="3", type="aws_vpc")77 ec2_digest = ResourceDigest(id="4", type="aws_instance")78 relations = [79 ResourceEdge(from_node=subnet_digest, to_node=vpc_digest),80 ResourceEdge(from_node=route_digest, to_node=vpc_digest),81 ResourceEdge(from_node=ec2_digest, to_node=subnet_digest),82 ]83 result = sut.group_by_group(84 [85 Resource(digest=subnet_digest, name=""),86 Resource(87 digest=route_digest, name="", details="default: True, public: False"88 ),89 Resource(digest=vpc_digest, name=""),90 Resource(digest=ec2_digest, name=""),91 ],92 relations,93 )94 assert_that(result).contains_key("")95 assert_that(result[""]).is_length(4)96 for resource in result[""]:97 assert_that(resource.digest).is_not_equal_to(subnet_digest)98 relationships = sut.process_relationships(result, relations)99 assert_that(relationships).is_length(4)100 assert_that(relationships).contains(101 ResourceEdge(102 from_node=ResourceDigest(id=PRIVATE_SUBNET, type="aws_subnet"),103 to_node=vpc_digest,104 )105 )106 assert_that(relationships).contains(107 ResourceEdge(from_node=route_digest, to_node=vpc_digest)108 )109 assert_that(relationships).contains(110 ResourceEdge(111 from_node=ec2_digest,112 to_node=ResourceDigest(id=PRIVATE_SUBNET, type="aws_subnet"),113 )114 )115 def test_should_detect_public_and_private_subnet(self):116 sut = VpcDiagram("6")117 public_subnet_digest = ResourceDigest(id="1", type="aws_subnet")118 private_subnet_digest = ResourceDigest(id="2", type="aws_subnet")119 main_route_digest = ResourceDigest(id="3", type="aws_route_table")120 public_route_digest = ResourceDigest(id="4", type="aws_route_table")121 private_route_digest = ResourceDigest(id="5", type="aws_route_table")122 vpc_digest = ResourceDigest(id="6", type="aws_vpc")123 ec2_digest = ResourceDigest(id="7", type="aws_instance")124 relations = [125 ResourceEdge(from_node=public_subnet_digest, to_node=vpc_digest),126 ResourceEdge(from_node=private_subnet_digest, to_node=vpc_digest),127 ResourceEdge(from_node=main_route_digest, to_node=vpc_digest),128 ResourceEdge(from_node=public_route_digest, to_node=public_subnet_digest),129 ResourceEdge(from_node=private_route_digest, to_node=private_subnet_digest),130 ResourceEdge(from_node=ec2_digest, to_node=private_subnet_digest),131 ]132 result = sut.group_by_group(133 [134 Resource(digest=public_subnet_digest, name=""),135 Resource(digest=private_subnet_digest, name=""),136 Resource(137 digest=main_route_digest,138 name="",139 details="default: True, public: False",140 ),141 Resource(142 digest=public_route_digest,143 name="",144 details="default: False, public: True",145 ),146 Resource(147 digest=private_route_digest,148 name="",149 details="default: False, public: False",150 ),151 Resource(digest=vpc_digest, name=""),152 Resource(digest=ec2_digest, name=""),153 ],154 relations,155 )156 assert_that(result).contains_key("")157 assert_that(result[""]).is_length(7)158 for resource in result[""]:159 assert_that(resource.digest).is_not_equal_to(public_subnet_digest)160 assert_that(resource.digest).is_not_equal_to(private_subnet_digest)161 relationships = sut.process_relationships(result, relations)162 assert_that(relationships).contains(163 ResourceEdge(164 from_node=public_route_digest,165 to_node=ResourceDigest(id=PUBLIC_SUBNET, type="aws_subnet"),166 )167 )168 assert_that(relationships).contains(169 ResourceEdge(170 from_node=private_route_digest,171 to_node=ResourceDigest(id=PRIVATE_SUBNET, type="aws_subnet"),172 )173 )174 assert_that(relationships).contains(175 ResourceEdge(176 from_node=ec2_digest,177 to_node=ResourceDigest(id=PRIVATE_SUBNET, type="aws_subnet"),178 )179 )180 def test_asg_ecs(self):181 sut = VpcDiagram("4")182 subnet_1_digest = ResourceDigest(id="1", type="aws_subnet")183 subnet_2_digest = ResourceDigest(id="2", type="aws_subnet")184 route_digest = ResourceDigest(id="3", type="aws_route_table")185 vpc_digest = ResourceDigest(id="4", type="aws_vpc")186 ec2_1_digest = ResourceDigest(id="5", type="aws_instance")187 ec2_2_digest = ResourceDigest(id="6", type="aws_instance")188 autoscaling_group_digest = ResourceDigest(189 id="asg_1", type="aws_autoscaling_group"190 )191 ecs_cluster_1_digest = ResourceDigest(id="8", type="aws_ecs_cluster")192 ecs_cluster_2_digest = ResourceDigest(id="9", type="aws_ecs_cluster")193 relations = [194 ResourceEdge(from_node=subnet_1_digest, to_node=vpc_digest),195 ResourceEdge(from_node=subnet_2_digest, to_node=vpc_digest),196 ResourceEdge(from_node=route_digest, to_node=vpc_digest),197 ResourceEdge(from_node=ec2_1_digest, to_node=subnet_1_digest),198 ResourceEdge(from_node=ec2_2_digest, to_node=subnet_2_digest),199 ResourceEdge(from_node=ec2_1_digest, to_node=autoscaling_group_digest),200 ResourceEdge(from_node=ec2_2_digest, to_node=autoscaling_group_digest),201 ResourceEdge(from_node=ecs_cluster_1_digest, to_node=ec2_1_digest),202 ResourceEdge(from_node=ecs_cluster_2_digest, to_node=ec2_2_digest),203 ]204 result = sut.group_by_group(205 [206 Resource(digest=subnet_1_digest, name=""),207 Resource(digest=subnet_2_digest, name=""),208 Resource(209 digest=route_digest, name="", details="default: True, public: True"210 ),211 Resource(digest=vpc_digest, name=""),212 Resource(digest=ec2_1_digest, name=""),213 Resource(digest=ec2_2_digest, name=""),214 Resource(digest=ecs_cluster_1_digest, name=""),215 Resource(digest=ecs_cluster_2_digest, name=""),216 Resource(digest=autoscaling_group_digest, name=""),217 ],218 relations,219 )220 assert_that(result).contains_key("")221 assert_that(result[""]).is_length(6)222 for resource in result[""]:223 assert_that(resource.digest).is_not_equal_to(ec2_1_digest)224 assert_that(resource.digest).is_not_equal_to(ec2_2_digest)225 assert_that(resource.digest).is_not_equal_to(ecs_cluster_1_digest)226 assert_that(resource.digest).is_not_equal_to(ecs_cluster_2_digest)227 relationships = sut.process_relationships(result, relations)228 assert_that(relationships).contains(229 ResourceEdge(230 from_node=ResourceDigest(231 id=ASG_ECS_INSTANCE_AGGREGATE_PREFIX + "asg_1",232 type="aws_ecs_cluster",233 ),234 to_node=ResourceDigest(235 id=ASG_EC2_AGGREGATE_PREFIX + "asg_1", type="aws_instance"236 ),237 )238 )239 assert_that(relationships).contains(240 ResourceEdge(...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run assertpy automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful