コード例 #1
0
ファイル: test_moimpl.py プロジェクト: whchoi98/cobra
 def test_MoStatus_fromString(self, statusStr, obj, created, modified,
                              deleted):
     mostat = MoStatus.fromString(statusStr)
     assert isinstance(mostat, obj)
     assert mostat.created == created
     assert mostat.modified == modified
     assert mostat.deleted == deleted
コード例 #2
0
ファイル: test_moimpl.py プロジェクト: bischatt78/cobra
 def test_MoStatus_fromString(self, statusStr, obj, created, modified,
                             deleted):
     mostat = MoStatus.fromString(statusStr)
     assert isinstance(mostat, obj)
     assert mostat.created == created
     assert mostat.modified == modified
     assert mostat.deleted == deleted
コード例 #3
0
ファイル: test_moimpl.py プロジェクト: whchoi98/cobra
 def test_MoStatus_props(self, init, prop, expected):
     status = MoStatus(init)
     assert eval("status." + prop) == expected
コード例 #4
0
ファイル: test_moimpl.py プロジェクト: whchoi98/cobra
 def test_MoStatus_offBit(self, init, offBits, offBitsExpected):
     status = MoStatus(init)
     status.offBit(offBits)
     assert str(status) == offBitsExpected
コード例 #5
0
ファイル: test_moimpl.py プロジェクト: whchoi98/cobra
 def test_MoStatus_cmp(self):
     status1 = MoStatus(MoStatus.CREATED)
     status2 = MoStatus(MoStatus.CREATED)
     assert status1 == status2
コード例 #6
0
ファイル: test_moimpl.py プロジェクト: whchoi98/cobra
 def test_MoStatus_clear(self):
     status = MoStatus(MoStatus.CREATED | MoStatus.MODIFIED)
     status.clear()
     assert status.created == False
     assert status.deleted == False
     assert status.modified == False
コード例 #7
0
ファイル: test_moimpl.py プロジェクト: bischatt78/cobra
 def test_MoStatus_offBit(self, init, offBits, offBitsExpected):
     status = MoStatus(init)
     status.offBit(offBits)
     assert str(status) == offBitsExpected
コード例 #8
0
ファイル: test_moimpl.py プロジェクト: bischatt78/cobra
 def test_MoStatus_clear(self):
     status = MoStatus(MoStatus.CREATED | MoStatus.MODIFIED)
     status.clear()
     assert status.created == False
     assert status.deleted == False
     assert status.modified == False