project_name
string | class_name
string | class_modifiers
string | class_implements
int64 | class_extends
int64 | function_name
string | function_body
string | cyclomatic_complexity
int64 | NLOC
int64 | num_parameter
int64 | num_token
int64 | num_variable
int64 | start_line
int64 | end_line
int64 | function_index
int64 | function_params
string | function_variable
string | function_return_type
string | function_body_line_type
string | function_num_functions
int64 | function_num_lines
int64 | outgoing_function_count
int64 | outgoing_function_names
string | incoming_function_count
int64 | incoming_function_names
string | lexical_representation
string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
etianen_django-reversion
|
GetForModelDbTest
|
public
| 0
| 1
|
testGetForModelDb
|
def testGetForModelDb(self):with reversion.create_revision(using="postgres"):obj = TestModel.objects.create()self.assertEqual(Version.objects.using("postgres").get_for_model(obj.__class__).count(), 1)
| 1
| 4
| 1
| 50
| 0
| 24
| 27
| 24
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 6
| 4
| 6
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "get_for_model", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForModelDb) defined within the public class called GetForModelDbTest, that inherit another class.The function start at line 24 and ends at 27. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "get_for_model", "Version.objects.using"].
|
etianen_django-reversion
|
GetForModelDbTest
|
public
| 0
| 1
|
testGetForModelDbMySql
|
def testGetForModelDbMySql(self):with reversion.create_revision(using="mysql"):obj = TestModel.objects.create()self.assertEqual(Version.objects.using("mysql").get_for_model(obj.__class__).count(), 1)
| 1
| 4
| 1
| 50
| 0
| 29
| 32
| 29
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 6
| 4
| 6
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "get_for_model", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForModelDbMySql) defined within the public class called GetForModelDbTest, that inherit another class.The function start at line 29 and ends at 32. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "get_for_model", "Version.objects.using"].
|
etianen_django-reversion
|
GetForObjectTest
|
public
| 0
| 1
|
testGetForObject
|
def testGetForObject(self):with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).count(), 1)
| 1
| 4
| 1
| 40
| 0
| 37
| 40
| 37
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 5
| 4
| 5
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObject) defined within the public class called GetForObjectTest, that inherit another class.The function start at line 37 and ends at 40. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectTest
|
public
| 0
| 1
|
testGetForObjectEmpty
|
def testGetForObjectEmpty(self):obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).count(), 0)
| 1
| 3
| 1
| 33
| 0
| 42
| 44
| 42
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1}
| 4
| 3
| 4
|
["TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectEmpty) defined within the public class called GetForObjectTest, that inherit another class.The function start at line 42 and ends at 44. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called inside which are ["TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectTest
|
public
| 0
| 1
|
testGetForObjectOrdering
|
def testGetForObjectOrdering(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.name = "v2"obj.save()self.assertEqual(Version.objects.get_for_object(obj)[0].field_dict["name"], "v2")self.assertEqual(Version.objects.get_for_object(obj)[1].field_dict["name"], "v1")
| 1
| 8
| 1
| 84
| 0
| 46
| 53
| 46
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 3, "With": 2}
| 8
| 8
| 8
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "Version.objects.get_for_object", "self.assertEqual", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectOrdering) defined within the public class called GetForObjectTest, that inherit another class.The function start at line 46 and ends at 53. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "Version.objects.get_for_object", "self.assertEqual", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectTest
|
public
| 0
| 1
|
testGetForObjectFiltering
|
def testGetForObjectFiltering(self):with reversion.create_revision():obj_1 = TestModel.objects.create()with reversion.create_revision():obj_2 = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj_1).get().object, obj_1)self.assertEqual(Version.objects.get_for_object(obj_2).get().object, obj_2)
| 1
| 7
| 1
| 79
| 0
| 55
| 61
| 55
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 2, "With": 2}
| 10
| 7
| 10
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectFiltering) defined within the public class called GetForObjectTest, that inherit another class.The function start at line 55 and ends at 61. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectDbTest
|
public
| 0
| 1
|
testGetForObjectDb
|
def testGetForObjectDb(self):with reversion.create_revision(using="postgres"):obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).count(), 0)self.assertEqual(Version.objects.using("postgres").get_for_object(obj).count(), 1)
| 1
| 5
| 1
| 67
| 0
| 67
| 71
| 67
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "get_for_object", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForObjectDb) defined within the public class called GetForObjectDbTest, that inherit another class.The function start at line 67 and ends at 71. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "get_for_object", "Version.objects.using"].
|
etianen_django-reversion
|
GetForObjectDbTest
|
public
| 0
| 1
|
testGetForObjectDbMySql
|
def testGetForObjectDbMySql(self):with reversion.create_revision(using="mysql"):obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).count(), 0)self.assertEqual(Version.objects.using("mysql").get_for_object(obj).count(), 1)
| 1
| 5
| 1
| 67
| 0
| 73
| 77
| 73
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "get_for_object", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForObjectDbMySql) defined within the public class called GetForObjectDbTest, that inherit another class.The function start at line 73 and ends at 77. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "get_for_object", "Version.objects.using"].
|
etianen_django-reversion
|
GetForObjectModelDbTest
|
public
| 0
| 1
|
testGetForObjectModelDb
|
def testGetForObjectModelDb(self):with reversion.create_revision():obj = TestModel.objects.db_manager("postgres").create()self.assertEqual(Version.objects.get_for_object(obj).count(), 0)self.assertEqual(Version.objects.get_for_object(obj, model_db="postgres").count(), 1)
| 1
| 5
| 1
| 68
| 0
| 83
| 87
| 83
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "create", "TestModel.objects.db_manager", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectModelDb) defined within the public class called GetForObjectModelDbTest, that inherit another class.The function start at line 83 and ends at 87. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "create", "TestModel.objects.db_manager", "self.assertEqual", "count", "Version.objects.get_for_object", "self.assertEqual", "count", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectUniqueTest
|
public
| 0
| 1
|
testGetForObjectUnique
|
def testGetForObjectUnique(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.save()self.assertEqual(len(list(Version.objects.get_for_object(obj).get_unique())), 1)
| 1
| 6
| 1
| 58
| 0
| 92
| 97
| 92
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 2}
| 9
| 6
| 9
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "len", "list", "get_unique", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectUnique) defined within the public class called GetForObjectUniqueTest, that inherit another class.The function start at line 92 and ends at 97. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "len", "list", "get_unique", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectUniqueTest
|
public
| 0
| 1
|
testGetForObjectUniqueMiss
|
def testGetForObjectUniqueMiss(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.name = "v2"obj.save()self.assertEqual(len(list(Version.objects.get_for_object(obj).get_unique())), 2)
| 1
| 7
| 1
| 63
| 0
| 99
| 105
| 99
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 2, "With": 2}
| 9
| 7
| 9
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "len", "list", "get_unique", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testGetForObjectUniqueMiss) defined within the public class called GetForObjectUniqueTest, that inherit another class.The function start at line 99 and ends at 105. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "len", "list", "get_unique", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
GetForObjectReferenceTest
|
public
| 0
| 1
|
testGetForObjectReference
|
def testGetForObjectReference(self):with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 1)
| 1
| 4
| 1
| 44
| 0
| 110
| 113
| 110
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 5
| 4
| 5
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference"]
| 0
|
[]
|
The function (testGetForObjectReference) defined within the public class called GetForObjectReferenceTest, that inherit another class.The function start at line 110 and ends at 113. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference"].
|
etianen_django-reversion
|
GetForObjectReferenceTest
|
public
| 0
| 1
|
testGetForObjectReferenceEmpty
|
def testGetForObjectReferenceEmpty(self):obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 0)
| 1
| 3
| 1
| 37
| 0
| 115
| 117
| 115
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1}
| 4
| 3
| 4
|
["TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference"]
| 0
|
[]
|
The function (testGetForObjectReferenceEmpty) defined within the public class called GetForObjectReferenceTest, that inherit another class.The function start at line 115 and ends at 117. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functions called inside which are ["TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference"].
|
etianen_django-reversion
|
GetForObjectReferenceTest
|
public
| 0
| 1
|
testGetForObjectReferenceOrdering
|
def testGetForObjectReferenceOrdering(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.name = "v2"obj.save()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk)[0].field_dict["name"], "v2")self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk)[1].field_dict["name"], "v1")
| 1
| 8
| 1
| 92
| 0
| 119
| 126
| 119
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 3, "With": 2}
| 8
| 8
| 8
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "Version.objects.get_for_object_reference", "self.assertEqual", "Version.objects.get_for_object_reference"]
| 0
|
[]
|
The function (testGetForObjectReferenceOrdering) defined within the public class called GetForObjectReferenceTest, that inherit another class.The function start at line 119 and ends at 126. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "Version.objects.get_for_object_reference", "self.assertEqual", "Version.objects.get_for_object_reference"].
|
etianen_django-reversion
|
GetForObjectReferenceTest
|
public
| 0
| 1
|
testGetForObjectReferenceFiltering
|
def testGetForObjectReferenceFiltering(self):with reversion.create_revision():obj_1 = TestModel.objects.create()with reversion.create_revision():obj_2 = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj_1.pk).get().object, obj_1)self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj_2.pk).get().object, obj_2)
| 1
| 7
| 1
| 87
| 0
| 128
| 134
| 128
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 2, "With": 2}
| 10
| 7
| 10
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object_reference", "self.assertEqual", "get", "Version.objects.get_for_object_reference"]
| 0
|
[]
|
The function (testGetForObjectReferenceFiltering) defined within the public class called GetForObjectReferenceTest, that inherit another class.The function start at line 128 and ends at 134. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object_reference", "self.assertEqual", "get", "Version.objects.get_for_object_reference"].
|
etianen_django-reversion
|
GetForObjectReferenceDbTest
|
public
| 0
| 1
|
testGetForObjectReferenceModelDb
|
def testGetForObjectReferenceModelDb(self):with reversion.create_revision(using="postgres"):obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 0)self.assertEqual(Version.objects.using("postgres").get_for_object_reference(TestModel, obj.pk).count(), 1)
| 1
| 5
| 1
| 75
| 0
| 140
| 144
| 140
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "get_for_object_reference", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForObjectReferenceModelDb) defined within the public class called GetForObjectReferenceDbTest, that inherit another class.The function start at line 140 and ends at 144. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "get_for_object_reference", "Version.objects.using"].
|
etianen_django-reversion
|
GetForObjectReferenceDbTest
|
public
| 0
| 1
|
testGetForObjectReferenceModelDb
|
def testGetForObjectReferenceModelDb(self):with reversion.create_revision():obj = TestModel.objects.db_manager("postgres").create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 0)self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk, model_db="postgres").count(), 1)
| 1
| 5
| 1
| 76
| 0
| 150
| 154
| 150
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "get_for_object_reference", "Version.objects.using"]
| 0
|
[]
|
The function (testGetForObjectReferenceModelDb) defined within the public class called GetForObjectReferenceDbTest, that inherit another class.The function start at line 150 and ends at 154. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "get_for_object_reference", "Version.objects.using"].
|
etianen_django-reversion
|
GetForObjectReferenceModelDbTest
|
public
| 0
| 1
|
testGetForObjectReferenceModelDbMySql
|
def testGetForObjectReferenceModelDbMySql(self):with reversion.create_revision():obj = TestModel.objects.db_manager("mysql").create()self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk).count(), 0)self.assertEqual(Version.objects.get_for_object_reference(TestModel, obj.pk, model_db="mysql").count(), 1)
| 1
| 5
| 1
| 76
| 0
| 156
| 160
| 156
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 9
| 5
| 9
|
["reversion.create_revision", "create", "TestModel.objects.db_manager", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "Version.objects.get_for_object_reference"]
| 0
|
[]
|
The function (testGetForObjectReferenceModelDbMySql) defined within the public class called GetForObjectReferenceModelDbTest, that inherit another class.The function start at line 156 and ends at 160. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 9.0 functions, and It has 9.0 functions called inside which are ["reversion.create_revision", "create", "TestModel.objects.db_manager", "self.assertEqual", "count", "Version.objects.get_for_object_reference", "self.assertEqual", "count", "Version.objects.get_for_object_reference"].
|
etianen_django-reversion
|
GetDeletedTest
|
public
| 0
| 1
|
testGetDeleted
|
def testGetDeleted(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.save()obj.delete()self.assertEqual(Version.objects.get_deleted(TestModel).count(), 1)
| 1
| 7
| 1
| 57
| 0
| 166
| 172
| 166
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 2}
| 8
| 7
| 8
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted"]
| 0
|
[]
|
The function (testGetDeleted) defined within the public class called GetDeletedTest, that inherit another class.The function start at line 166 and ends at 172. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted"].
|
etianen_django-reversion
|
GetDeletedTest
|
public
| 0
| 1
|
testGetDeletedEmpty
|
def testGetDeletedEmpty(self):with reversion.create_revision():TestModel.objects.create()self.assertEqual(Version.objects.get_deleted(TestModel).count(), 0)
| 1
| 4
| 1
| 38
| 0
| 174
| 177
| 174
|
self
|
[]
|
None
|
{"Expr": 2, "With": 1}
| 5
| 4
| 5
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_deleted"]
| 0
|
[]
|
The function (testGetDeletedEmpty) defined within the public class called GetDeletedTest, that inherit another class.The function start at line 174 and ends at 177. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_deleted"].
|
etianen_django-reversion
|
GetDeletedTest
|
public
| 0
| 1
|
testGetDeletedOrdering
|
def testGetDeletedOrdering(self):with reversion.create_revision():obj_1 = TestModel.objects.create()with reversion.create_revision():obj_2 = TestModel.objects.create()pk_1 = obj_1.pkobj_1.delete()pk_2 = obj_2.pkobj_2.delete()self.assertEqual(Version.objects.get_deleted(TestModel)[0].object_id, str(pk_2))self.assertEqual(Version.objects.get_deleted(TestModel)[1].object_id, str(pk_1))
| 1
| 11
| 1
| 103
| 0
| 179
| 189
| 179
|
self
|
[]
|
None
|
{"Assign": 4, "Expr": 4, "With": 2}
| 12
| 11
| 12
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj_1.delete", "obj_2.delete", "self.assertEqual", "Version.objects.get_deleted", "str", "self.assertEqual", "Version.objects.get_deleted", "str"]
| 0
|
[]
|
The function (testGetDeletedOrdering) defined within the public class called GetDeletedTest, that inherit another class.The function start at line 179 and ends at 189. It contains 11 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 12.0 functions, and It has 12.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj_1.delete", "obj_2.delete", "self.assertEqual", "Version.objects.get_deleted", "str", "self.assertEqual", "Version.objects.get_deleted", "str"].
|
etianen_django-reversion
|
GetDeletedTest
|
public
| 0
| 1
|
testGetDeletedPostgres
|
def testGetDeletedPostgres(self):with reversion.create_revision(using="postgres"):obj = TestModel.objects.using("postgres").create()with reversion.create_revision(using="postgres"):obj.save()obj.delete()self.assertEqual(Version.objects.using("postgres").get_deleted(TestModel, model_db="postgres").count(), 1)
| 1
| 7
| 1
| 77
| 0
| 191
| 197
| 191
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 2}
| 10
| 7
| 10
|
["reversion.create_revision", "create", "TestModel.objects.using", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "get_deleted", "Version.objects.using"]
| 0
|
[]
|
The function (testGetDeletedPostgres) defined within the public class called GetDeletedTest, that inherit another class.The function start at line 191 and ends at 197. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "create", "TestModel.objects.using", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "get_deleted", "Version.objects.using"].
|
etianen_django-reversion
|
GetDeletedTest
|
public
| 0
| 1
|
testGetDeletedMySQL
|
def testGetDeletedMySQL(self):with reversion.create_revision(using="mysql"):obj = TestModel.objects.using("mysql").create()with reversion.create_revision(using="mysql"):obj.save()obj.delete()self.assertEqual(Version.objects.using("mysql").get_deleted(TestModel, model_db="mysql").count(), 1)
| 1
| 7
| 1
| 77
| 0
| 199
| 205
| 199
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 2}
| 10
| 7
| 10
|
["reversion.create_revision", "create", "TestModel.objects.using", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "get_deleted", "Version.objects.using"]
| 0
|
[]
|
The function (testGetDeletedMySQL) defined within the public class called GetDeletedTest, that inherit another class.The function start at line 199 and ends at 205. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "create", "TestModel.objects.using", "reversion.create_revision", "obj.save", "obj.delete", "self.assertEqual", "count", "get_deleted", "Version.objects.using"].
|
etianen_django-reversion
|
GetDeletedDbTest
|
public
| 0
| 1
|
testGetDeletedDb
|
def testGetDeletedDb(self):with reversion.create_revision(using="postgres"):obj = TestModel.objects.create()obj.delete()self.assertEqual(Version.objects.get_deleted(TestModel).count(), 0)self.assertEqual(Version.objects.using("postgres").get_deleted(TestModel).count(), 1)
| 1
| 6
| 1
| 72
| 0
| 211
| 216
| 211
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 1}
| 10
| 6
| 10
|
["reversion.create_revision", "TestModel.objects.create", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "get_deleted", "Version.objects.using"]
| 0
|
[]
|
The function (testGetDeletedDb) defined within the public class called GetDeletedDbTest, that inherit another class.The function start at line 211 and ends at 216. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "get_deleted", "Version.objects.using"].
|
etianen_django-reversion
|
GetDeletedDbTest
|
public
| 0
| 1
|
testGetDeletedDbMySql
|
def testGetDeletedDbMySql(self):with reversion.create_revision(using="mysql"):obj = TestModel.objects.create()obj.delete()self.assertEqual(Version.objects.get_deleted(TestModel).count(), 0)self.assertEqual(Version.objects.using("mysql").get_deleted(TestModel).count(), 1)
| 1
| 6
| 1
| 72
| 0
| 218
| 223
| 218
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 1}
| 10
| 6
| 10
|
["reversion.create_revision", "TestModel.objects.create", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "get_deleted", "Version.objects.using"]
| 0
|
[]
|
The function (testGetDeletedDbMySql) defined within the public class called GetDeletedDbTest, that inherit another class.The function start at line 218 and ends at 223. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "get_deleted", "Version.objects.using"].
|
etianen_django-reversion
|
GetDeletedModelDbTest
|
public
| 0
| 1
|
testGetDeletedModelDb
|
def testGetDeletedModelDb(self):with reversion.create_revision():obj = TestModel.objects.db_manager("postgres").create()obj.delete()self.assertEqual(Version.objects.get_deleted(TestModel).count(), 0)self.assertEqual(Version.objects.get_deleted(TestModel, model_db="postgres").count(), 1)
| 1
| 6
| 1
| 73
| 0
| 229
| 234
| 229
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 3, "With": 1}
| 10
| 6
| 10
|
["reversion.create_revision", "create", "TestModel.objects.db_manager", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "Version.objects.get_deleted"]
| 0
|
[]
|
The function (testGetDeletedModelDb) defined within the public class called GetDeletedModelDbTest, that inherit another class.The function start at line 229 and ends at 234. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "create", "TestModel.objects.db_manager", "obj.delete", "self.assertEqual", "count", "Version.objects.get_deleted", "self.assertEqual", "count", "Version.objects.get_deleted"].
|
etianen_django-reversion
|
FieldDictTest
|
public
| 0
| 1
|
testFieldDict
|
def testFieldDict(self):with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"id": obj.pk,"name": "v1","related": [],})
| 1
| 8
| 1
| 58
| 0
| 239
| 246
| 239
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 5
| 8
| 5
|
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDict) defined within the public class called FieldDictTest, that inherit another class.The function start at line 239 and ends at 246. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
FieldDictTest
|
public
| 0
| 1
|
testFieldDictM2M
|
def testFieldDictM2M(self):obj_related = TestModelRelated.objects.create()with reversion.create_revision():obj = TestModel.objects.create()obj.related.add(obj_related)self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"id": obj.pk,"name": "v1","related": [obj_related.pk],})
| 1
| 10
| 1
| 78
| 0
| 248
| 257
| 248
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 2, "With": 1}
| 7
| 10
| 7
|
["TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj.related.add", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDictM2M) defined within the public class called FieldDictTest, that inherit another class.The function start at line 248 and ends at 257. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 7.0 functions, and It has 7.0 functions called inside which are ["TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj.related.add", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
FieldDictFieldsTest
|
public
| 0
| 1
|
testFieldDictFieldFields
|
def testFieldDictFieldFields(self):reversion.register(TestModel, fields=("name",))with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"name": "v1",})
| 1
| 7
| 1
| 60
| 0
| 262
| 268
| 262
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 6
| 7
| 6
|
["reversion.register", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDictFieldFields) defined within the public class called FieldDictFieldsTest, that inherit another class.The function start at line 262 and ends at 268. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["reversion.register", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
FieldDictExcludeTest
|
public
| 0
| 1
|
testFieldDictFieldExclude
|
def testFieldDictFieldExclude(self):reversion.register(TestModel, exclude=("name",))with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"id": obj.pk,"related": [],})
| 1
| 8
| 1
| 67
| 0
| 273
| 280
| 273
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 1}
| 6
| 8
| 6
|
["reversion.register", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDictFieldExclude) defined within the public class called FieldDictExcludeTest, that inherit another class.The function start at line 273 and ends at 280. It contains 8 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["reversion.register", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
FieldDictInheritanceTest
|
public
| 0
| 1
|
testFieldDictInheritance
|
def testFieldDictInheritance(self):with reversion.create_revision():obj = TestModelParent.objects.create()self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"id": obj.pk,"name": "v1","related": [],"parent_name": "parent v1","testmodel_ptr_id": obj.pk,})
| 1
| 10
| 1
| 68
| 0
| 285
| 294
| 285
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 1, "With": 1}
| 5
| 10
| 5
|
["reversion.create_revision", "TestModelParent.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDictInheritance) defined within the public class called FieldDictInheritanceTest, that inherit another class.The function start at line 285 and ends at 294. It contains 10 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 5.0 functions, and It has 5.0 functions called inside which are ["reversion.create_revision", "TestModelParent.objects.create", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
FieldDictInheritanceTest
|
public
| 0
| 1
|
testFieldDictInheritanceUpdate
|
def testFieldDictInheritanceUpdate(self):obj = TestModelParent.objects.create()with reversion.create_revision():obj.name = "v2"obj.parent_name = "parent v2"obj.save()self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {"id": obj.pk,"name": "v2","parent_name": "parent v2","related": [],"testmodel_ptr_id": obj.pk,})
| 1
| 13
| 1
| 83
| 0
| 296
| 308
| 296
|
self
|
[]
|
None
|
{"Assign": 3, "Expr": 2, "With": 1}
| 6
| 13
| 6
|
["TestModelParent.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testFieldDictInheritanceUpdate) defined within the public class called FieldDictInheritanceTest, that inherit another class.The function start at line 296 and ends at 308. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 6.0 functions, and It has 6.0 functions called inside which are ["TestModelParent.objects.create", "reversion.create_revision", "obj.save", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
M2MTest
|
public
| 0
| 1
|
testM2MSave
|
def testM2MSave(self):v1 = TestModelRelated.objects.create(name="v1")v2 = TestModelRelated.objects.create(name="v2")with reversion.create_revision():obj = TestModel.objects.create()obj.related.add(v1)obj.related.add(v2)version = Version.objects.get_for_object(obj).first()self.assertEqual(set(version.field_dict["related"]), {v1.pk, v2.pk})
| 1
| 9
| 1
| 99
| 0
| 313
| 321
| 313
|
self
|
[]
|
None
|
{"Assign": 4, "Expr": 3, "With": 1}
| 10
| 9
| 10
|
["TestModelRelated.objects.create", "TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj.related.add", "obj.related.add", "first", "Version.objects.get_for_object", "self.assertEqual", "set"]
| 0
|
[]
|
The function (testM2MSave) defined within the public class called M2MTest, that inherit another class.The function start at line 313 and ends at 321. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["TestModelRelated.objects.create", "TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj.related.add", "obj.related.add", "first", "Version.objects.get_for_object", "self.assertEqual", "set"].
|
etianen_django-reversion
|
RevertTest
|
public
| 0
| 1
|
testRevert
|
def testRevert(self):with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.name = "v2"obj.save()Version.objects.get_for_object(obj)[1].revert()obj.refresh_from_db()self.assertEqual(obj.name, "v1")
| 1
| 9
| 1
| 68
| 0
| 326
| 334
| 326
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 4, "With": 2}
| 8
| 9
| 8
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual"]
| 0
|
[]
|
The function (testRevert) defined within the public class called RevertTest, that inherit another class.The function start at line 326 and ends at 334. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual"].
|
etianen_django-reversion
|
RevertTest
|
public
| 0
| 1
|
testRevertBadSerializedData
|
def testRevertBadSerializedData(self):with reversion.create_revision():obj = TestModel.objects.create()Version.objects.get_for_object(obj).update(serialized_data="boom")with self.assertRaises(reversion.RevertError):Version.objects.get_for_object(obj).get().revert()
| 1
| 6
| 1
| 62
| 0
| 336
| 341
| 336
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 2}
| 8
| 6
| 8
|
["reversion.create_revision", "TestModel.objects.create", "update", "Version.objects.get_for_object", "self.assertRaises", "revert", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testRevertBadSerializedData) defined within the public class called RevertTest, that inherit another class.The function start at line 336 and ends at 341. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "update", "Version.objects.get_for_object", "self.assertRaises", "revert", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
RevertTest
|
public
| 0
| 1
|
testRevertBadFormat
|
def testRevertBadFormat(self):with reversion.create_revision():obj = TestModel.objects.create()Version.objects.get_for_object(obj).update(format="boom")with self.assertRaises(reversion.RevertError):Version.objects.get_for_object(obj).get().revert()
| 1
| 6
| 1
| 62
| 0
| 343
| 348
| 343
|
self
|
[]
|
None
|
{"Assign": 1, "Expr": 2, "With": 2}
| 8
| 6
| 8
|
["reversion.create_revision", "TestModel.objects.create", "update", "Version.objects.get_for_object", "self.assertRaises", "revert", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testRevertBadFormat) defined within the public class called RevertTest, that inherit another class.The function start at line 343 and ends at 348. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "update", "Version.objects.get_for_object", "self.assertRaises", "revert", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
RevertTest
|
public
| 0
| 1
|
testRevert
|
def testRevert(self):with reversion.create_revision():obj_1 = TestModel.objects.create(name="obj_1 v1")obj_2 = TestModel.objects.create(name="obj_2 v1")with reversion.create_revision():obj_1.name = "obj_1 v2"obj_1.save()obj_2.name = "obj_2 v2"obj_2.save()Version.objects.get_for_object(obj_1)[1].revision.revert()obj_1.refresh_from_db()self.assertEqual(obj_1.name, "obj_1 v1")obj_2.refresh_from_db()self.assertEqual(obj_2.name, "obj_2 v1")
| 1
| 18
| 1
| 110
| 0
| 353
| 370
| 353
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 4, "With": 2}
| 8
| 9
| 8
|
["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual"]
| 0
|
[]
|
The function (testRevert) defined within the public class called RevertTest, that inherit another class.The function start at line 353 and ends at 370. It contains 18 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 8.0 functions, and It has 8.0 functions called inside which are ["reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual"].
|
etianen_django-reversion
|
RevisionRevertDeleteTest
|
public
| 0
| 1
|
testRevertDelete
|
def testRevertDelete(self):reversion.register(TestModel, follow=("related",))reversion.register(TestModelRelated)with reversion.create_revision():obj = TestModel.objects.create()obj_related = TestModelRelated.objects.create()with reversion.create_revision():obj.related.add(obj_related)obj.name = "v2"obj.save()Version.objects.get_for_object(obj)[1].revision.revert(delete=True)obj.refresh_from_db()self.assertEqual(obj.name, "v1")self.assertFalse(TestModelRelated.objects.filter(pk=obj_related.pk).exists())
| 1
| 14
| 1
| 130
| 0
| 375
| 388
| 375
|
self
|
[]
|
None
|
{"Assign": 3, "Expr": 8, "With": 2}
| 15
| 14
| 15
|
["reversion.register", "reversion.register", "reversion.create_revision", "TestModel.objects.create", "TestModelRelated.objects.create", "reversion.create_revision", "obj.related.add", "obj.save", "revision.revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual", "self.assertFalse", "exists", "TestModelRelated.objects.filter"]
| 0
|
[]
|
The function (testRevertDelete) defined within the public class called RevisionRevertDeleteTest, that inherit another class.The function start at line 375 and ends at 388. It contains 14 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15.0 functions called inside which are ["reversion.register", "reversion.register", "reversion.create_revision", "TestModel.objects.create", "TestModelRelated.objects.create", "reversion.create_revision", "obj.related.add", "obj.save", "revision.revert", "Version.objects.get_for_object", "obj.refresh_from_db", "self.assertEqual", "self.assertFalse", "exists", "TestModelRelated.objects.filter"].
|
etianen_django-reversion
|
RevisionRevertDeleteTest
|
public
| 0
| 1
|
testRevertDeleteNestedInline
|
def testRevertDeleteNestedInline(self):reversion.register(TestModel, follow=("testmodelinline_set",))reversion.register(TestModelInline, follow=("testmodelnestedinline_set",))reversion.register(TestModelNestedInline)with reversion.create_revision():parent = TestModel.objects.create()child_a = TestModelInline.objects.create(test_model=parent)grandchild_a = TestModelNestedInline.objects.create(test_model_inline=child_a)with reversion.create_revision():child_b = TestModelInline.objects.create(test_model=parent)grandchild_b = TestModelNestedInline.objects.create(test_model_inline=child_b)reversion.add_to_revision(parent)Version.objects.get_for_object(parent)[1].revision.revert(delete=True)parent.refresh_from_db()self.assertRaises(TestModelInline.DoesNotExist,lambda: child_b.refresh_from_db())self.assertRaises(TestModelNestedInline.DoesNotExist,lambda: grandchild_b.refresh_from_db())self.assertEqual(list(parent.testmodelinline_set.all()), [child_a])self.assertEqual(list(child_a.testmodelnestedinline_set.all()), [grandchild_a])
| 1
| 33
| 1
| 209
| 0
| 390
| 425
| 390
|
self
|
[]
|
None
|
{"Assign": 5, "Expr": 10, "With": 2}
| 24
| 36
| 24
|
["reversion.register", "reversion.register", "reversion.register", "reversion.create_revision", "TestModel.objects.create", "TestModelInline.objects.create", "TestModelNestedInline.objects.create", "reversion.create_revision", "TestModelInline.objects.create", "TestModelNestedInline.objects.create", "reversion.add_to_revision", "revision.revert", "Version.objects.get_for_object", "parent.refresh_from_db", "self.assertRaises", "child_b.refresh_from_db", "self.assertRaises", "grandchild_b.refresh_from_db", "self.assertEqual", "list", "parent.testmodelinline_set.all", "self.assertEqual", "list", "child_a.testmodelnestedinline_set.all"]
| 0
|
[]
|
The function (testRevertDeleteNestedInline) defined within the public class called RevisionRevertDeleteTest, that inherit another class.The function start at line 390 and ends at 425. It contains 33 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 24.0 functions, and It has 24.0 functions called inside which are ["reversion.register", "reversion.register", "reversion.register", "reversion.create_revision", "TestModel.objects.create", "TestModelInline.objects.create", "TestModelNestedInline.objects.create", "reversion.create_revision", "TestModelInline.objects.create", "TestModelNestedInline.objects.create", "reversion.add_to_revision", "revision.revert", "Version.objects.get_for_object", "parent.refresh_from_db", "self.assertRaises", "child_b.refresh_from_db", "self.assertRaises", "grandchild_b.refresh_from_db", "self.assertEqual", "list", "parent.testmodelinline_set.all", "self.assertEqual", "list", "child_a.testmodelnestedinline_set.all"].
|
etianen_django-reversion
|
NaturalKeyTest
|
public
| 0
| 1
|
setUp
|
def setUp(self):reversion.register(TestModelInlineByNaturalKey, use_natural_foreign_keys=True)reversion.register(TestModelWithNaturalKey)
| 1
| 3
| 1
| 21
| 0
| 430
| 432
| 430
|
self
|
[]
|
None
|
{"Expr": 2}
| 2
| 3
| 2
|
["reversion.register", "reversion.register"]
| 180
|
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.activity_test_py.ActivityTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.client_test_py.ClientTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.collection_test_py.CollectionTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.comment_test_py.CommentTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.feed_test_py.FeedTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.image_test_py.ImageTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.mapper_test_py.MapperTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.note_test_py.NoteTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.person_test_py.PersonTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.place_test_py.PlaceTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.postable_test_py.PostableTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.pumpobject_test_py.PumpObjectTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_copy_py.Test_ex_copy_Copying_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_Deleting_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_InNormalMode_CaretPosition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_ModeTransition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_move_py.Test_ex_move_Moveing_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.test_state_py.StateTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_keys_py.Test_KeySequenceTokenizer_tokenize_one.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mapping_Expanding.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mappings_AddingAndRemoving.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_marks_py.MarksTests.setUp"]
|
The function (setUp) defined within the public class called NaturalKeyTest, that inherit another class.The function start at line 430 and ends at 432. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["reversion.register", "reversion.register"], It has 180.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.activity_test_py.ActivityTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.client_test_py.ClientTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.collection_test_py.CollectionTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.comment_test_py.CommentTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.feed_test_py.FeedTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.image_test_py.ImageTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.mapper_test_py.MapperTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.note_test_py.NoteTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.person_test_py.PersonTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.place_test_py.PlaceTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.postable_test_py.PostableTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.pumpobject_test_py.PumpObjectTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_copy_py.Test_ex_copy_Copying_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_Deleting_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_InNormalMode_CaretPosition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_ModeTransition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_move_py.Test_ex_move_Moveing_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.test_state_py.StateTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_keys_py.Test_KeySequenceTokenizer_tokenize_one.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mapping_Expanding.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mappings_AddingAndRemoving.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_marks_py.MarksTests.setUp"].
|
etianen_django-reversion
|
NaturalKeyTest
|
public
| 0
| 1
|
testNaturalKeyInline
|
def testNaturalKeyInline(self):with reversion.create_revision():inline = TestModelWithNaturalKey.objects.create()obj = TestModelInlineByNaturalKey.objects.create(test_model=inline)self.assertEqual(json.loads(Version.objects.get_for_object(obj).get().serialized_data), [{'fields': {'test_model': ['v1']},'model': 'test_app.testmodelinlinebynaturalkey','pk': 1}])self.assertEqual(Version.objects.get_for_object(obj).get().field_dict, {'test_model_id': 1,'id': 1,})
| 1
| 13
| 1
| 109
| 0
| 434
| 446
| 434
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 2, "With": 1}
| 10
| 13
| 10
|
["reversion.create_revision", "TestModelWithNaturalKey.objects.create", "TestModelInlineByNaturalKey.objects.create", "self.assertEqual", "json.loads", "get", "Version.objects.get_for_object", "self.assertEqual", "get", "Version.objects.get_for_object"]
| 0
|
[]
|
The function (testNaturalKeyInline) defined within the public class called NaturalKeyTest, that inherit another class.The function start at line 434 and ends at 446. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 10.0 functions, and It has 10.0 functions called inside which are ["reversion.create_revision", "TestModelWithNaturalKey.objects.create", "TestModelInlineByNaturalKey.objects.create", "self.assertEqual", "json.loads", "get", "Version.objects.get_for_object", "self.assertEqual", "get", "Version.objects.get_for_object"].
|
etianen_django-reversion
|
NaturalKeyTest
|
public
| 0
| 1
|
setUp
|
def setUp(self):reversion.register(TestModelWithUniqueConstraint)
| 1
| 2
| 1
| 11
| 0
| 451
| 452
| 451
|
self
|
[]
|
None
|
{"Expr": 2}
| 2
| 3
| 2
|
["reversion.register", "reversion.register"]
| 180
|
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.activity_test_py.ActivityTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.client_test_py.ClientTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.collection_test_py.CollectionTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.comment_test_py.CommentTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.feed_test_py.FeedTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.image_test_py.ImageTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.mapper_test_py.MapperTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.note_test_py.NoteTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.person_test_py.PersonTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.place_test_py.PlaceTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.postable_test_py.PostableTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.pumpobject_test_py.PumpObjectTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_copy_py.Test_ex_copy_Copying_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_Deleting_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_InNormalMode_CaretPosition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_ModeTransition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_move_py.Test_ex_move_Moveing_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.test_state_py.StateTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_keys_py.Test_KeySequenceTokenizer_tokenize_one.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mapping_Expanding.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mappings_AddingAndRemoving.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_marks_py.MarksTests.setUp"]
|
The function (setUp) defined within the public class called NaturalKeyTest, that inherit another class.The function start at line 451 and ends at 452. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside which are ["reversion.register", "reversion.register"], It has 180.0 functions calling this function which are ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.BuildAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.tests.api.test_views_py.ProjectAPITestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.activity_test_py.ActivityTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.client_test_py.ClientTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.collection_test_py.CollectionTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.comment_test_py.CommentTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.feed_test_py.FeedTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.image_test_py.ImageTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.mapper_test_py.MapperTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.note_test_py.NoteTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.person_test_py.PersonTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.place_test_py.PlaceTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.postable_test_py.PostableTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3573634_xray7224_pypump.tests.pumpobject_test_py.PumpObjectTest.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_copy_py.Test_ex_copy_Copying_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_Deleting_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_InNormalMode_CaretPosition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_delete_py.Test_ex_delete_ModeTransition.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_move_py.Test_ex_move_Moveing_InNormalMode_MultipleLines.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.test_state_py.StateTestCase.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_keys_py.Test_KeySequenceTokenizer_tokenize_one.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mapping_Expanding.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_mappings_py.Test_Mappings_AddingAndRemoving.setUp", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.vi.test_marks_py.MarksTests.setUp"].
|
etianen_django-reversion
|
TransactionRollbackTest
|
public
| 0
| 1
|
testTransactionInRollbackState
|
def testTransactionInRollbackState(self):with reversion.create_revision():try:TestModelWithUniqueConstraint.objects.create(name='A')TestModelWithUniqueConstraint.objects.create(name='A')except Exception:pass
| 2
| 7
| 1
| 38
| 0
| 454
| 460
| 454
|
self
|
[]
|
None
|
{"Expr": 2, "Try": 1, "With": 1}
| 3
| 7
| 3
|
["reversion.create_revision", "TestModelWithUniqueConstraint.objects.create", "TestModelWithUniqueConstraint.objects.create"]
| 0
|
[]
|
The function (testTransactionInRollbackState) defined within the public class called TransactionRollbackTest, that inherit another class.The function start at line 454 and ends at 460. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["reversion.create_revision", "TestModelWithUniqueConstraint.objects.create", "TestModelWithUniqueConstraint.objects.create"].
|
etianen_django-reversion
|
CreateRevisionTest
|
public
| 0
| 1
|
testCreateRevision
|
def testCreateRevision(self):response = self.client.post("/test-app/create-revision/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,))
| 1
| 4
| 1
| 38
| 0
| 7
| 10
| 7
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 1}
| 3
| 4
| 3
|
["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"]
| 0
|
[]
|
The function (testCreateRevision) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 7 and ends at 10. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"].
|
etianen_django-reversion
|
CreateRevisionTest
|
public
| 0
| 1
|
testCreateRevisionGet
|
def testCreateRevisionGet(self):self.client.get("/test-app/create-revision/")self.assertNoRevision()
| 1
| 3
| 1
| 18
| 0
| 12
| 14
| 12
|
self
|
[]
|
None
|
{"Expr": 2}
| 2
| 3
| 2
|
["self.client.get", "self.assertNoRevision"]
| 0
|
[]
|
The function (testCreateRevisionGet) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 12 and ends at 14. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called inside which are ["self.client.get", "self.assertNoRevision"].
|
etianen_django-reversion
|
CreateRevisionUserTest
|
public
| 0
| 1
|
testCreateRevisionUser
|
def testCreateRevisionUser(self):response = self.client.post("/test-app/create-revision/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,), user=self.user)
| 1
| 4
| 1
| 44
| 0
| 19
| 22
| 19
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 1}
| 3
| 4
| 3
|
["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"]
| 0
|
[]
|
The function (testCreateRevisionUser) defined within the public class called CreateRevisionUserTest, that inherit another class.The function start at line 19 and ends at 22. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"].
|
etianen_django-reversion
|
RevisionMixinTest
|
public
| 0
| 1
|
testRevisionMixin
|
def testRevisionMixin(self):response = self.client.post("/test-app/revision-mixin/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,))
| 1
| 4
| 1
| 38
| 0
| 27
| 30
| 27
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 1}
| 3
| 4
| 3
|
["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"]
| 0
|
[]
|
The function (testRevisionMixin) defined within the public class called RevisionMixinTest, that inherit another class.The function start at line 27 and ends at 30. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"].
|
etianen_django-reversion
|
RevisionMixinTest
|
public
| 0
| 1
|
testRevisionMixinGet
|
def testRevisionMixinGet(self):self.client.get("/test-app/revision-mixin/")self.assertNoRevision()
| 1
| 3
| 1
| 18
| 0
| 32
| 34
| 32
|
self
|
[]
|
None
|
{"Expr": 2}
| 2
| 3
| 2
|
["self.client.get", "self.assertNoRevision"]
| 0
|
[]
|
The function (testRevisionMixinGet) defined within the public class called RevisionMixinTest, that inherit another class.The function start at line 32 and ends at 34. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called inside which are ["self.client.get", "self.assertNoRevision"].
|
etianen_django-reversion
|
RevisionMixinTest
|
public
| 0
| 1
|
testRevisionMixinCustomPredicate
|
def testRevisionMixinCustomPredicate(self):self.client.post("/test-app/revision-mixin/", HTTP_X_NOREVISION="true")self.assertNoRevision()
| 1
| 3
| 1
| 22
| 0
| 36
| 38
| 36
|
self
|
[]
|
None
|
{"Expr": 2}
| 2
| 3
| 2
|
["self.client.post", "self.assertNoRevision"]
| 0
|
[]
|
The function (testRevisionMixinCustomPredicate) defined within the public class called RevisionMixinTest, that inherit another class.The function start at line 36 and ends at 38. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 2.0 functions, and It has 2.0 functions called inside which are ["self.client.post", "self.assertNoRevision"].
|
etianen_django-reversion
|
CreateRevisionUserTest
|
public
| 0
| 1
|
testCreateRevisionUser
|
def testCreateRevisionUser(self):response = self.client.post("/test-app/create-revision/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,), user=self.user)
| 1
| 4
| 1
| 44
| 0
| 43
| 46
| 19
|
self
|
[]
|
None
|
{"Assign": 2, "Expr": 1}
| 3
| 4
| 3
|
["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"]
| 0
|
[]
|
The function (testCreateRevisionUser) defined within the public class called CreateRevisionUserTest, that inherit another class.The function start at line 43 and ends at 46. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It declares 3.0 functions, and It has 3.0 functions called inside which are ["self.client.post", "TestModel.objects.get", "self.assertSingleRevision"].
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.