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
AdminRevisionViewTest
public
0
1
testRevisionViewOldRevision
def testRevisionViewOldRevision(self):response = self.client.get(resolve_url("admin:test_app_testmodelparent_revision",self.obj.pk,Version.objects.get_for_object(self.obj)[0].pk,))self.assertContains(response, 'value="v2"')self.assertContains(response, 'value="parent v2"')
1
8
1
57
0
97
104
97
self
[]
None
{"Assign": 1, "Expr": 2}
5
8
5
["self.client.get", "resolve_url", "Version.objects.get_for_object", "self.assertContains", "self.assertContains"]
0
[]
The function (testRevisionViewOldRevision) defined within the public class called AdminRevisionViewTest, that inherit another class.The function start at line 97 and ends at 104. 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....
etianen_django-reversion
AdminRevisionViewTest
public
0
1
testRevisionViewRevertError
def testRevisionViewRevertError(self):Version.objects.get_for_object(self.obj).update(format="boom")response = self.client.get(resolve_url("admin:test_app_testmodelparent_revision",self.obj.pk,Version.objects.get_for_object(self.obj)[1].pk,))self.assertEqual(response["Location"].replace("http://testserver", ""),resolve...
1
11
1
80
0
106
116
106
self
[]
None
{"Assign": 1, "Expr": 2}
8
11
8
["update", "Version.objects.get_for_object", "self.client.get", "resolve_url", "Version.objects.get_for_object", "self.assertEqual", "replace", "resolve_url"]
0
[]
The function (testRevisionViewRevertError) defined within the public class called AdminRevisionViewTest, that inherit another class.The function start at line 106 and ends at 116. 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 valu...
etianen_django-reversion
AdminRevisionViewTest
public
0
1
testRevisionViewRevert
def testRevisionViewRevert(self):self.client.post(resolve_url("admin:test_app_testmodelparent_revision",self.obj.pk,Version.objects.get_for_object(self.obj)[1].pk,), {"name": "v1","parent_name": "parent v1",})self.obj.refresh_from_db()self.assertEqual(self.obj.name, "v1")self.assertEqual(self.obj.parent_name, "parent v...
1
12
1
81
0
118
129
118
self
[]
None
{"Expr": 4}
6
12
6
["self.client.post", "resolve_url", "Version.objects.get_for_object", "self.obj.refresh_from_db", "self.assertEqual", "self.assertEqual"]
0
[]
The function (testRevisionViewRevert) defined within the public class called AdminRevisionViewTest, that inherit another class.The function start at line 118 and ends at 129. It contains 12 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...
etianen_django-reversion
AdminRevisionViewSignalsTest
public
0
1
__init__
def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)self.signal_fired = None
1
3
3
28
0
135
137
135
self,*args,**kwargs
[]
None
{"Assign": 1, "Expr": 1}
2
3
2
["__init__", "super"]
4,993
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.logging_py.LoggerHandler.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.schedule_...
The function (__init__) defined within the public class called AdminRevisionViewSignalsTest, that inherit another class.The function start at line 135 and ends at 137. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [135.0] and does not return any value. It dec...
etianen_django-reversion
AdminRevisionViewSignalsTest
public
0
1
signal_receiver
def signal_receiver(self, sender, **kwargs):"""Receiver that tracks which signal was fired."""self.signal_fired = senderraise RuntimeError(f"Django signal was fired for {sender}!")
1
3
3
22
0
139
142
139
self,sender,**kwargs
[]
None
{"Assign": 1, "Expr": 1}
1
4
1
["RuntimeError"]
0
[]
The function (signal_receiver) defined within the public class called AdminRevisionViewSignalsTest, that inherit another class.The function start at line 139 and ends at 142. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [139.0] and does not return any value....
etianen_django-reversion
AdminMixin
public
0
1
setUp
def setUp(self):super().setUp()with reversion.create_revision():self.obj = TestModelParent.objects.create()# Connect all the model signals that should be mutedself.signals_to_test = [pre_save, post_save, pre_delete, post_delete, m2m_changed]for signal in self.signals_to_test:signal.connect(receiver=self.signal_receiver...
2
7
1
66
0
144
152
144
self
[]
None
{"Expr": 3}
4
4
4
["setUp", "super", "admin.site.register", "self.reloadUrls"]
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.MyDri...
The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 144 and ends at 152. 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 4.0 functions, It h...
etianen_django-reversion
AdminMixin
public
0
1
tearDown
def tearDown(self):# Disconnect all signalsfor signal in self.signals_to_test:signal.disconnect(receiver=self.signal_receiver, sender=TestModelParent)super().tearDown()
2
4
1
33
0
154
158
154
self
[]
None
{"Expr": 3}
4
4
4
["tearDown", "super", "admin.site.unregister", "self.reloadUrls"]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.commands.test_all_cmds_py.AllCommandsTester.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.te...
The function (tearDown) defined within the public class called AdminMixin, that inherit another class.The function start at line 154 and ends at 158. It contains 4 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 4.0 functions, I...
etianen_django-reversion
AdminRevisionViewSignalsTest
public
0
1
testGetForRevisionViewDoesntFireDjangoSignals
def testGetForRevisionViewDoesntFireDjangoSignals(self):"""Test that viewing a revision (GET request) doesn't fire Django model signals."""self.signal_fired = None# This should NOT fire any signals since it's a GET requestresponse = self.client.get(resolve_url("admin:test_app_testmodelparent_revision",self.obj.pk,Versi...
1
9
1
67
0
160
173
160
self
[]
None
{"Assign": 2, "Expr": 3}
5
14
5
["self.client.get", "resolve_url", "Version.objects.get_for_object", "self.assertEqual", "self.assertIsNone"]
0
[]
The function (testGetForRevisionViewDoesntFireDjangoSignals) defined within the public class called AdminRevisionViewSignalsTest, that inherit another class.The function start at line 160 and ends at 173. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and ...
etianen_django-reversion
AdminRevisionViewSignalsTest
public
0
1
testPostForRevisionViewFiresDjangoSignals
def testPostForRevisionViewFiresDjangoSignals(self):"""Test that reverting a revision (POST request) properly fires Django model signals."""self.signal_fired = None# This SHOULD fire signals since it's a POST request (actual revert)with self.assertRaises(RuntimeError) as cm:self.client.post(resolve_url("admin:test_app_...
1
13
1
89
0
175
192
175
self
[]
None
{"Assign": 1, "Expr": 4, "With": 1}
7
18
7
["self.assertRaises", "self.client.post", "resolve_url", "Version.objects.get_for_object", "self.assertIn", "str", "self.assertIsNotNone"]
0
[]
The function (testPostForRevisionViewFiresDjangoSignals) defined within the public class called AdminRevisionViewSignalsTest, that inherit another class.The function start at line 175 and ends at 192. It contains 13 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and doe...
etianen_django-reversion
AdminMixin
public
0
1
setUp
def setUp(self):super().setUp()with reversion.create_revision():obj = TestModelParent.objects.create()obj.delete()
1
5
1
33
0
197
201
197
self
[]
None
{"Expr": 3}
4
4
4
["setUp", "super", "admin.site.register", "self.reloadUrls"]
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.MyDri...
The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 197 and ends at 201. 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 4.0 functions, It h...
etianen_django-reversion
AdminRecoverViewTest
public
0
1
testRecoverView
def testRecoverView(self):response = self.client.get(resolve_url("admin:test_app_testmodelparent_recover",Version.objects.get_for_model(TestModelParent).get().pk,))self.assertContains(response, 'value="v1"')self.assertContains(response, 'value="parent v1"')self.assertIn("recover", response.context)self.assertTrue(respo...
1
9
1
71
0
203
211
203
self
[]
None
{"Assign": 1, "Expr": 4}
8
9
8
["self.client.get", "resolve_url", "get", "Version.objects.get_for_model", "self.assertContains", "self.assertContains", "self.assertIn", "self.assertTrue"]
0
[]
The function (testRecoverView) defined within the public class called AdminRecoverViewTest, that inherit another class.The function start at line 203 and ends at 211. 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...
etianen_django-reversion
AdminRecoverViewTest
public
0
1
testRecoverViewRecover
def testRecoverViewRecover(self):self.client.post(resolve_url("admin:test_app_testmodelparent_recover",Version.objects.get_for_model(TestModelParent).get().pk,), {"name": "v1","parent_name": "parent v1",})obj = TestModelParent.objects.get()self.assertEqual(obj.name, "v1")self.assertEqual(obj.parent_name, "parent v1")
1
11
1
72
0
213
223
213
self
[]
None
{"Assign": 1, "Expr": 3}
7
11
7
["self.client.post", "resolve_url", "get", "Version.objects.get_for_model", "TestModelParent.objects.get", "self.assertEqual", "self.assertEqual"]
0
[]
The function (testRecoverViewRecover) defined within the public class called AdminRecoverViewTest, that inherit another class.The function start at line 213 and ends at 223. 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 ...
etianen_django-reversion
AdminRecoverlistViewTest
public
0
1
testRecoverlistView
def testRecoverlistView(self):with reversion.create_revision():obj = TestModelParent.objects.create()obj.delete()response = self.client.get(resolve_url("admin:test_app_testmodelparent_recoverlist"))self.assertContains(response, resolve_url("admin:test_app_testmodelparent_recover",Version.objects.get_for_model(TestModel...
1
9
1
66
0
228
236
228
self
[]
None
{"Assign": 2, "Expr": 2, "With": 1}
9
9
9
["reversion.create_revision", "TestModelParent.objects.create", "obj.delete", "self.client.get", "resolve_url", "self.assertContains", "resolve_url", "get", "Version.objects.get_for_model"]
0
[]
The function (testRecoverlistView) defined within the public class called AdminRecoverlistViewTest, that inherit another class.The function start at line 228 and ends at 236. 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 ...
etianen_django-reversion
AdminHistoryViewTest
public
0
1
testHistorylistView
def testHistorylistView(self):with reversion.create_revision():obj = TestModelParent.objects.create()response = self.client.get(resolve_url("admin:test_app_testmodelparent_history", obj.pk))self.assertContains(response, resolve_url("admin:test_app_testmodelparent_revision",obj.pk,Version.objects.get_for_model(TestModel...
1
9
1
69
0
241
249
241
self
[]
None
{"Assign": 2, "Expr": 1, "With": 1}
8
9
8
["reversion.create_revision", "TestModelParent.objects.create", "self.client.get", "resolve_url", "self.assertContains", "resolve_url", "get", "Version.objects.get_for_model"]
0
[]
The function (testHistorylistView) defined within the public class called AdminHistoryViewTest, that inherit another class.The function start at line 241 and ends at 249. 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 decl...
etianen_django-reversion
AdminMixin
public
0
1
setUp
def setUp(self):super().setUp()admin.site.register(TestModelParent, VersionAdmin)self.reloadUrls()
1
4
1
27
0
254
257
15
self
[]
None
{"Expr": 3}
4
4
4
["setUp", "super", "admin.site.register", "self.reloadUrls"]
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.MyDri...
The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 254 and ends at 257. 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 4.0 functions, It h...
etianen_django-reversion
AdminMixin
public
0
1
tearDown
def tearDown(self):super().tearDown()admin.site.unregister(TestModelParent)self.reloadUrls()
1
4
1
25
0
259
262
20
self
[]
None
{"Expr": 3}
4
4
4
["tearDown", "super", "admin.site.unregister", "self.reloadUrls"]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.commands.test_all_cmds_py.AllCommandsTester.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.te...
The function (tearDown) defined within the public class called AdminMixin, that inherit another class.The function start at line 259 and ends at 262. 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 4.0 functions, I...
etianen_django-reversion
AdminQuotingTest
public
0
1
testHistoryWithQuotedPrimaryKey
def testHistoryWithQuotedPrimaryKey(self):pk = 'ABC_123'quoted_pk = admin.utils.quote(pk)# test is invalid if quoting does not change anythingassert quoted_pk != pkwith reversion.create_revision():obj = TestModelEscapePK.objects.create(name=pk)revision_url = resolve_url("admin:test_app_testmodelescapepk_revision",quote...
1
19
1
110
0
264
285
264
self
[]
None
{"Assign": 7, "Expr": 2, "With": 1}
11
22
11
["admin.utils.quote", "reversion.create_revision", "TestModelEscapePK.objects.create", "resolve_url", "get", "Version.objects.get_for_object", "resolve_url", "self.client.get", "self.assertContains", "self.client.get", "self.assertContains"]
0
[]
The function (testHistoryWithQuotedPrimaryKey) defined within the public class called AdminQuotingTest, that inherit another class.The function start at line 264 and ends at 285. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value...
etianen_django-reversion
AdminMixin
public
0
1
setUp
def setUp(self):super().setUp()admin.site.register(TestModelParent, VersionAdmin)self.reloadUrls()
1
4
1
27
0
305
308
15
self
[]
None
{"Expr": 3}
4
4
4
["setUp", "super", "admin.site.register", "self.reloadUrls"]
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.MyDri...
The function (setUp) defined within the public class called AdminMixin, that inherit another class.The function start at line 305 and ends at 308. 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 4.0 functions, It h...
etianen_django-reversion
AdminMixin
public
0
1
tearDown
def tearDown(self):super().tearDown()admin.site.unregister(TestModelParent)self.reloadUrls()
1
4
1
25
0
310
313
20
self
[]
None
{"Expr": 3}
4
4
4
["tearDown", "super", "admin.site.unregister", "self.reloadUrls"]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.commands.test_all_cmds_py.AllCommandsTester.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3574420_guillermooo_vintageous.tests.ex.test_location_py.TestSearchHelpers.te...
The function (tearDown) defined within the public class called AdminMixin, that inherit another class.The function start at line 310 and ends at 313. 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 4.0 functions, I...
etianen_django-reversion
AdminRegisterInlineTest
public
0
1
testAutoRegisterInline
def testAutoRegisterInline(self):self.assertTrue(reversion.is_registered(TestModelInline))
1
2
1
16
0
315
316
315
self
[]
None
{"Expr": 1}
2
2
2
["self.assertTrue", "reversion.is_registered"]
0
[]
The function (testAutoRegisterInline) defined within the public class called AdminRegisterInlineTest, that inherit another class.The function start at line 315 and ends at 316. 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. I...
etianen_django-reversion
AdminRegisterInlineTest
public
0
1
testAutoRegisterGenericInline
def testAutoRegisterGenericInline(self):self.assertTrue(reversion.is_registered(TestModelGenericInline))
1
2
1
16
0
318
319
318
self
[]
None
{"Expr": 1}
2
2
2
["self.assertTrue", "reversion.is_registered"]
0
[]
The function (testAutoRegisterGenericInline) defined within the public class called AdminRegisterInlineTest, that inherit another class.The function start at line 318 and ends at 319. 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 v...
etianen_django-reversion
SaveTest
public
0
1
testModelSave
def testModelSave(self):TestModel.objects.create()self.assertNoRevision()
1
3
1
17
0
15
17
15
self
[]
None
{"Expr": 2}
2
3
2
["TestModel.objects.create", "self.assertNoRevision"]
0
[]
The function (testModelSave) defined within the public class called SaveTest, that inherit another class.The function start at line 15 and ends at 17. 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, ...
etianen_django-reversion
IsRegisteredTest
public
0
1
testIsRegistered
def testIsRegistered(self):self.assertTrue(reversion.is_registered(TestModel))
1
2
1
16
0
22
23
22
self
[]
None
{"Expr": 1}
2
2
2
["self.assertTrue", "reversion.is_registered"]
0
[]
The function (testIsRegistered) defined within the public class called IsRegisteredTest, that inherit another class.The function start at line 22 and ends at 23. 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 ...
etianen_django-reversion
IsRegisterUnregisteredTest
public
0
1
testIsRegisteredFalse
def testIsRegisteredFalse(self):self.assertFalse(reversion.is_registered(TestModel))
1
2
1
16
0
28
29
28
self
[]
None
{"Expr": 1}
2
2
2
["self.assertFalse", "reversion.is_registered"]
0
[]
The function (testIsRegisteredFalse) defined within the public class called IsRegisterUnregisteredTest, that inherit another class.The function start at line 28 and ends at 29. 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. I...
etianen_django-reversion
GetRegisteredModelsTest
public
0
1
testGetRegisteredModels
def testGetRegisteredModels(self):self.assertEqual(set(reversion.get_registered_models()), {TestModel})
1
2
1
22
0
34
35
34
self
[]
None
{"Expr": 1}
3
2
3
["self.assertEqual", "set", "reversion.get_registered_models"]
0
[]
The function (testGetRegisteredModels) defined within the public class called GetRegisteredModelsTest, that inherit another class.The function start at line 34 and ends at 35. 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...
etianen_django-reversion
RegisterTest
public
0
1
testRegister
def testRegister(self):reversion.register(TestModel)self.assertTrue(reversion.is_registered(TestModel))
1
3
1
22
0
40
42
40
self
[]
None
{"Expr": 2}
3
3
3
["reversion.register", "self.assertTrue", "reversion.is_registered"]
0
[]
The function (testRegister) defined within the public class called RegisterTest, that inherit another class.The function start at line 40 and ends at 42. 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 3.0 function...
etianen_django-reversion
RegisterTest
public
0
1
testRegisterDecorator
def testRegisterDecorator(self):@reversion.register()class TestModelDecorater(models.Model):passself.assertTrue(reversion.is_registered(TestModelDecorater))
1
5
1
31
0
44
48
44
self
[]
None
{"Expr": 1}
3
5
3
["reversion.register", "self.assertTrue", "reversion.is_registered"]
0
[]
The function (testRegisterDecorator) defined within the public class called RegisterTest, that inherit another class.The function start at line 44 and ends at 48. 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 3.0...
etianen_django-reversion
RegisterTest
public
0
1
testRegisterAlreadyRegistered
def testRegisterAlreadyRegistered(self):reversion.register(TestModel)with self.assertRaises(reversion.RegistrationError):reversion.register(TestModel)
1
4
1
27
0
50
53
50
self
[]
None
{"Expr": 2, "With": 1}
3
4
3
["reversion.register", "self.assertRaises", "reversion.register"]
0
[]
The function (testRegisterAlreadyRegistered) defined within the public class called RegisterTest, that inherit another class.The function start at line 50 and ends at 53. 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 decl...
etianen_django-reversion
RegisterTest
public
0
1
testRegisterM2MSThroughLazy
def testRegisterM2MSThroughLazy(self):# When register is used as a decorator in models.py, lazy relations haven't had a chance to be resolved, so# will still be a string.@reversion.register()class TestModelLazy(models.Model):related = models.ManyToManyField(TestModelRelated,through="TestModelThroughLazy",)class TestMod...
1
9
1
41
0
55
66
55
self
[]
None
{"Assign": 1}
2
12
2
["models.ManyToManyField", "reversion.register"]
0
[]
The function (testRegisterM2MSThroughLazy) defined within the public class called RegisterTest, that inherit another class.The function start at line 55 and ends at 66. 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 declar...
etianen_django-reversion
UnregisterTest
public
0
1
testUnregister
def testUnregister(self):reversion.unregister(TestModel)self.assertFalse(reversion.is_registered(TestModel))
1
3
1
22
0
71
73
71
self
[]
None
{"Expr": 2}
3
3
3
["reversion.unregister", "self.assertFalse", "reversion.is_registered"]
0
[]
The function (testUnregister) defined within the public class called UnregisterTest, that inherit another class.The function start at line 71 and ends at 73. 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 3.0 func...
etianen_django-reversion
UnregisterUnregisteredTest
public
0
1
testUnregisterNotRegistered
def testUnregisterNotRegistered(self):with self.assertRaises(reversion.RegistrationError):reversion.unregister(User)
1
3
1
21
0
78
80
78
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.unregister"]
0
[]
The function (testUnregisterNotRegistered) defined within the public class called UnregisterUnregisteredTest, that inherit another class.The function start at line 78 and ends at 80. 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 va...
etianen_django-reversion
CreateRevisionTest
public
0
1
testCreateRevision
def testCreateRevision(self):with reversion.create_revision():obj = TestModel.objects.create()self.assertSingleRevision((obj,))
1
4
1
30
0
85
88
85
self
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
3
4
3
["reversion.create_revision", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testCreateRevision) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 85 and ends at 88. 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 ...
etianen_django-reversion
CreateRevisionTest
public
0
1
testCreateRevisionNested
def testCreateRevisionNested(self):with reversion.create_revision():with reversion.create_revision():obj = TestModel.objects.create()self.assertSingleRevision((obj,))
1
5
1
37
0
90
94
90
self
[]
None
{"Assign": 1, "Expr": 1, "With": 2}
4
5
4
["reversion.create_revision", "reversion.create_revision", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionNested) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 90 and ends at 94. 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 dec...
etianen_django-reversion
CreateRevisionTest
public
0
1
testCreateRevisionEmpty
def testCreateRevisionEmpty(self):with reversion.create_revision():passself.assertNoRevision()
1
4
1
18
0
96
99
96
self
[]
None
{"Expr": 1, "With": 1}
2
4
2
["reversion.create_revision", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionEmpty) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 96 and ends at 99. 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 decl...
etianen_django-reversion
CreateRevisionTest
public
0
1
testCreateRevisionException
def testCreateRevisionException(self):try:with reversion.create_revision():TestModel.objects.create()raise Exception("Boom!")except Exception:passself.assertNoRevision()
2
8
1
35
0
101
108
101
self
[]
None
{"Expr": 2, "Try": 1, "With": 1}
4
8
4
["reversion.create_revision", "TestModel.objects.create", "Exception", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionException) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 101 and ends at 108. It contains 8 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. I...
etianen_django-reversion
CreateRevisionTest
public
0
1
testCreateRevisionDecorator
def testCreateRevisionDecorator(self):obj = reversion.create_revision()(TestModel.objects.create)()self.assertSingleRevision((obj,))
1
3
1
30
0
110
112
110
self
[]
None
{"Assign": 1, "Expr": 1}
2
3
2
["reversion.create_revision", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionDecorator) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 110 and ends at 112. 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. I...
etianen_django-reversion
CreateRevisionTest
public
0
1
testPreRevisionCommitSignal
def testPreRevisionCommitSignal(self):_callback = MagicMock()reversion.signals.pre_revision_commit.connect(_callback)with reversion.create_revision():TestModel.objects.create()self.assertEqual(_callback.call_count, 1)
1
6
1
44
0
114
120
114
self
[]
None
{"Assign": 1, "Expr": 3, "With": 1}
5
7
5
["MagicMock", "reversion.signals.pre_revision_commit.connect", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual"]
0
[]
The function (testPreRevisionCommitSignal) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 114 and ends at 120. 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. I...
etianen_django-reversion
CreateRevisionTest
public
0
1
testPostRevisionCommitSignal
def testPostRevisionCommitSignal(self):_callback = MagicMock()reversion.signals.post_revision_commit.connect(_callback)with reversion.create_revision():TestModel.objects.create()self.assertEqual(_callback.call_count, 1)
1
6
1
44
0
122
128
122
self
[]
None
{"Assign": 1, "Expr": 3, "With": 1}
5
7
5
["MagicMock", "reversion.signals.post_revision_commit.connect", "reversion.create_revision", "TestModel.objects.create", "self.assertEqual"]
0
[]
The function (testPostRevisionCommitSignal) defined within the public class called CreateRevisionTest, that inherit another class.The function start at line 122 and ends at 128. 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. ...
etianen_django-reversion
CreateRevisionAtomicTest
public
0
1
testCreateRevisionAtomic
def testCreateRevisionAtomic(self):self.assertFalse(get_connection().in_atomic_block)with reversion.create_revision():self.assertTrue(get_connection().in_atomic_block)
1
4
1
32
0
132
135
132
self
[]
None
{"Expr": 2, "With": 1}
5
4
5
["self.assertFalse", "get_connection", "reversion.create_revision", "self.assertTrue", "get_connection"]
0
[]
The function (testCreateRevisionAtomic) defined within the public class called CreateRevisionAtomicTest, that inherit another class.The function start at line 132 and ends at 135. 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...
etianen_django-reversion
CreateRevisionAtomicTest
public
0
1
testCreateRevisionNonAtomic
def testCreateRevisionNonAtomic(self):self.assertFalse(get_connection().in_atomic_block)with reversion.create_revision(atomic=False):self.assertFalse(get_connection().in_atomic_block)
1
4
1
35
0
137
140
137
self
[]
None
{"Expr": 2, "With": 1}
5
4
5
["self.assertFalse", "get_connection", "reversion.create_revision", "self.assertFalse", "get_connection"]
0
[]
The function (testCreateRevisionNonAtomic) defined within the public class called CreateRevisionAtomicTest, that inherit another class.The function start at line 137 and ends at 140. 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 va...
etianen_django-reversion
public
public
0
0
testCreateRevisionInOnCommitHandler.on_commit
def on_commit():with reversion.create_revision(atomic=True):model.name = 'oncommit'model.save()
1
4
0
24
0
151
154
151
null
[]
None
null
0
0
0
null
0
null
The function (testCreateRevisionInOnCommitHandler.on_commit) defined within the public class called public.The function start at line 151 and ends at 154. 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..
etianen_django-reversion
CreateRevisionAtomicTest
public
0
1
testCreateRevisionInOnCommitHandler
def testCreateRevisionInOnCommitHandler(self):from django.db import transactionfrom reversion.models import Revisionself.assertEqual(Revision.objects.all().count(), 0)with reversion.create_revision(atomic=True):model = TestModel.objects.create()def on_commit():with reversion.create_revision(atomic=True):model.name = 'o...
1
9
1
80
0
142
158
142
self
[]
None
{"Assign": 2, "Expr": 4, "With": 2}
11
17
11
["self.assertEqual", "count", "Revision.objects.all", "reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "model.save", "transaction.on_commit", "self.assertEqual", "count", "Revision.objects.all"]
0
[]
The function (testCreateRevisionInOnCommitHandler) defined within the public class called CreateRevisionAtomicTest, that inherit another class.The function start at line 142 and ends at 158. It contains 9 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not retur...
etianen_django-reversion
CreateRevisionManageManuallyTest
public
0
1
testCreateRevisionManageManually
def testCreateRevisionManageManually(self):with reversion.create_revision(manage_manually=True):TestModel.objects.create()self.assertNoRevision()
1
4
1
27
0
163
166
163
self
[]
None
{"Expr": 2, "With": 1}
3
4
3
["reversion.create_revision", "TestModel.objects.create", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionManageManually) defined within the public class called CreateRevisionManageManuallyTest, that inherit another class.The function start at line 163 and ends at 166. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
CreateRevisionManageManuallyTest
public
0
1
testCreateRevisionManageManuallyNested
def testCreateRevisionManageManuallyNested(self):with reversion.create_revision():with reversion.create_revision(manage_manually=True):TestModel.objects.create()self.assertNoRevision()
1
5
1
34
0
168
172
168
self
[]
None
{"Expr": 2, "With": 2}
4
5
4
["reversion.create_revision", "reversion.create_revision", "TestModel.objects.create", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionManageManuallyNested) defined within the public class called CreateRevisionManageManuallyTest, that inherit another class.The function start at line 168 and ends at 172. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and doe...
etianen_django-reversion
CreateRevisionDbTest
public
0
1
testCreateRevisionMultiDb
def testCreateRevisionMultiDb(self):with reversion.create_revision(using="mysql"), reversion.create_revision(using="postgres"):obj = TestModel.objects.create()self.assertNoRevision()self.assertSingleRevision((obj,), using="mysql")self.assertSingleRevision((obj,), using="postgres")
1
6
1
64
0
178
183
178
self
[]
None
{"Assign": 1, "Expr": 3, "With": 1}
6
6
6
["reversion.create_revision", "reversion.create_revision", "TestModel.objects.create", "self.assertNoRevision", "self.assertSingleRevision", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionMultiDb) defined within the public class called CreateRevisionDbTest, that inherit another class.The function start at line 178 and ends at 183. 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. I...
etianen_django-reversion
CreateRevisionFollowTest
public
0
1
testCreateRevisionFollow
def testCreateRevisionFollow(self):reversion.register(TestModel, follow=("related",))reversion.register(TestModelRelated)obj_related = TestModelRelated.objects.create()with reversion.create_revision():obj = TestModel.objects.create()obj.related.add(obj_related)self.assertSingleRevision((obj, obj_related))
1
8
1
67
0
188
195
188
self
[]
None
{"Assign": 2, "Expr": 4, "With": 1}
7
8
7
["reversion.register", "reversion.register", "TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "obj.related.add", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionFollow) defined within the public class called CreateRevisionFollowTest, that inherit another class.The function start at line 188 and ends at 195. 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...
etianen_django-reversion
CreateRevisionFollowTest
public
0
1
testCreateRevisionFollowThrough
def testCreateRevisionFollowThrough(self):reversion.register(TestModel, follow=("related_through",))reversion.register(TestModelThrough, follow=("test_model", "test_model_related",))reversion.register(TestModelRelated)obj_related = TestModelRelated.objects.create()with reversion.create_revision():obj = TestModel.object...
1
12
1
93
0
197
208
197
self
[]
None
{"Assign": 3, "Expr": 4, "With": 1}
8
12
8
["reversion.register", "reversion.register", "reversion.register", "TestModelRelated.objects.create", "reversion.create_revision", "TestModel.objects.create", "TestModelThrough.objects.create", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionFollowThrough) defined within the public class called CreateRevisionFollowTest, that inherit another class.The function start at line 197 and ends at 208. It contains 12 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return a...
etianen_django-reversion
CreateRevisionFollowTest
public
0
1
testCreateRevisionFollowInvalid
def testCreateRevisionFollowInvalid(self):reversion.register(TestModel, follow=("name",))with reversion.create_revision():with self.assertRaises(reversion.RegistrationError):TestModel.objects.create()
1
5
1
42
0
210
214
210
self
[]
None
{"Expr": 2, "With": 2}
4
5
4
["reversion.register", "reversion.create_revision", "self.assertRaises", "TestModel.objects.create"]
0
[]
The function (testCreateRevisionFollowInvalid) defined within the public class called CreateRevisionFollowTest, that inherit another class.The function start at line 210 and ends at 214. 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 an...
etianen_django-reversion
CreateRevisionIgnoreDuplicatesTest
public
0
1
testCreateRevisionIgnoreDuplicates
def testCreateRevisionIgnoreDuplicates(self):reversion.register(TestModel, ignore_duplicates=True)with reversion.create_revision():obj = TestModel.objects.create()with reversion.create_revision():obj.save()self.assertSingleRevision((obj,))
1
7
1
52
0
219
225
219
self
[]
None
{"Assign": 1, "Expr": 3, "With": 2}
6
7
6
["reversion.register", "reversion.create_revision", "TestModel.objects.create", "reversion.create_revision", "obj.save", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionIgnoreDuplicates) defined within the public class called CreateRevisionIgnoreDuplicatesTest, that inherit another class.The function start at line 219 and ends at 225. It contains 7 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does ...
etianen_django-reversion
CreateRevisionInheritanceTest
public
0
1
testCreateRevisionInheritance
def testCreateRevisionInheritance(self):reversion.register(TestModelParent, follow=("testmodel_ptr",))with reversion.create_revision():obj = TestModelParent.objects.create()self.assertSingleRevision((obj, obj.testmodel_ptr))
1
5
1
46
0
230
234
230
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.register", "reversion.create_revision", "TestModelParent.objects.create", "self.assertSingleRevision"]
0
[]
The function (testCreateRevisionInheritance) defined within the public class called CreateRevisionInheritanceTest, that inherit another class.The function start at line 230 and ends at 234. 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...
etianen_django-reversion
SetCommentTest
public
0
1
testSetComment
def testSetComment(self):with reversion.create_revision():reversion.set_comment("comment v1")obj = TestModel.objects.create()self.assertSingleRevision((obj,), comment="comment v1")
1
5
1
40
0
239
243
239
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.create_revision", "reversion.set_comment", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testSetComment) defined within the public class called SetCommentTest, that inherit another class.The function start at line 239 and ends at 243. 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 4.0 fu...
etianen_django-reversion
SetCommentTest
public
0
1
testSetCommentNoBlock
def testSetCommentNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.set_comment("comment v1")
1
3
1
21
0
245
247
245
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.set_comment"]
0
[]
The function (testSetCommentNoBlock) defined within the public class called SetCommentTest, that inherit another class.The function start at line 245 and ends at 247. 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...
etianen_django-reversion
GetCommentTest
public
0
1
testGetComment
def testGetComment(self):with reversion.create_revision():reversion.set_comment("comment v1")self.assertEqual(reversion.get_comment(), "comment v1")
1
4
1
30
0
252
255
252
self
[]
None
{"Expr": 2, "With": 1}
4
4
4
["reversion.create_revision", "reversion.set_comment", "self.assertEqual", "reversion.get_comment"]
0
[]
The function (testGetComment) defined within the public class called GetCommentTest, that inherit another class.The function start at line 252 and ends at 255. 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 4.0 fu...
etianen_django-reversion
GetCommentTest
public
0
1
testGetCommentDefault
def testGetCommentDefault(self):with reversion.create_revision():self.assertEqual(reversion.get_comment(), "")
1
3
1
24
0
257
259
257
self
[]
None
{"Expr": 1, "With": 1}
3
3
3
["reversion.create_revision", "self.assertEqual", "reversion.get_comment"]
0
[]
The function (testGetCommentDefault) defined within the public class called GetCommentTest, that inherit another class.The function start at line 257 and ends at 259. 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...
etianen_django-reversion
GetCommentTest
public
0
1
testGetCommentNoBlock
def testGetCommentNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.get_comment()
1
3
1
20
0
261
263
261
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.get_comment"]
0
[]
The function (testGetCommentNoBlock) defined within the public class called GetCommentTest, that inherit another class.The function start at line 261 and ends at 263. 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...
etianen_django-reversion
SetUserTest
public
0
1
testSetUser
def testSetUser(self):with reversion.create_revision():reversion.set_user(self.user)obj = TestModel.objects.create()self.assertSingleRevision((obj,), user=self.user)
1
5
1
44
0
268
272
268
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.create_revision", "reversion.set_user", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testSetUser) defined within the public class called SetUserTest, that inherit another class.The function start at line 268 and ends at 272. 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 4.0 function...
etianen_django-reversion
SetUserTest
public
0
1
testSetUserNoBlock
def testSetUserNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.set_user(self.user)
1
3
1
23
0
274
276
274
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.set_user"]
0
[]
The function (testSetUserNoBlock) defined within the public class called SetUserTest, that inherit another class.The function start at line 274 and ends at 276. 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 f...
etianen_django-reversion
GetUserTest
public
0
1
testGetUser
def testGetUser(self):with reversion.create_revision():reversion.set_user(self.user)self.assertEqual(reversion.get_user(), self.user)
1
4
1
34
0
281
284
281
self
[]
None
{"Expr": 2, "With": 1}
4
4
4
["reversion.create_revision", "reversion.set_user", "self.assertEqual", "reversion.get_user"]
0
[]
The function (testGetUser) defined within the public class called GetUserTest, that inherit another class.The function start at line 281 and ends at 284. 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 4.0 function...
etianen_django-reversion
GetUserTest
public
0
1
testGetUserDefault
def testGetUserDefault(self):with reversion.create_revision():self.assertEqual(reversion.get_user(), None)
1
3
1
24
0
286
288
286
self
[]
None
{"Expr": 1, "With": 1}
3
3
3
["reversion.create_revision", "self.assertEqual", "reversion.get_user"]
0
[]
The function (testGetUserDefault) defined within the public class called GetUserTest, that inherit another class.The function start at line 286 and ends at 288. 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 3.0 f...
etianen_django-reversion
GetUserTest
public
0
1
testGetUserNoBlock
def testGetUserNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.get_user()
1
3
1
20
0
290
292
290
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.get_user"]
0
[]
The function (testGetUserNoBlock) defined within the public class called GetUserTest, that inherit another class.The function start at line 290 and ends at 292. 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 f...
etianen_django-reversion
SetDateCreatedTest
public
0
1
testSetDateCreated
def testSetDateCreated(self):date_created = timezone.now() - timedelta(days=20)with reversion.create_revision():reversion.set_date_created(date_created)obj = TestModel.objects.create()self.assertSingleRevision((obj,), date_created=date_created)
1
6
1
54
0
297
302
297
self
[]
None
{"Assign": 2, "Expr": 2, "With": 1}
6
6
6
["timezone.now", "timedelta", "reversion.create_revision", "reversion.set_date_created", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testSetDateCreated) defined within the public class called SetDateCreatedTest, that inherit another class.The function start at line 297 and ends at 302. 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 declare...
etianen_django-reversion
SetDateCreatedTest
public
0
1
testDateCreatedNoBlock
def testDateCreatedNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.set_date_created(timezone.now())
1
3
1
25
0
304
306
304
self
[]
None
{"Expr": 1, "With": 1}
3
3
3
["self.assertRaises", "reversion.set_date_created", "timezone.now"]
0
[]
The function (testDateCreatedNoBlock) defined within the public class called SetDateCreatedTest, that inherit another class.The function start at line 304 and ends at 306. 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 dec...
etianen_django-reversion
GetDateCreatedTest
public
0
1
testGetDateCreated
def testGetDateCreated(self):date_created = timezone.now() - timedelta(days=20)with reversion.create_revision():reversion.set_date_created(date_created)self.assertEqual(reversion.get_date_created(), date_created)
1
5
1
44
0
311
315
311
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
6
5
6
["timezone.now", "timedelta", "reversion.create_revision", "reversion.set_date_created", "self.assertEqual", "reversion.get_date_created"]
0
[]
The function (testGetDateCreated) defined within the public class called GetDateCreatedTest, that inherit another class.The function start at line 311 and ends at 315. 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 declare...
etianen_django-reversion
GetDateCreatedTest
public
0
1
testGetDateCreatedDefault
def testGetDateCreatedDefault(self):with reversion.create_revision():self.assertAlmostEqual(reversion.get_date_created(), timezone.now(), delta=timedelta(seconds=1))
1
3
1
37
0
317
319
317
self
[]
None
{"Expr": 1, "With": 1}
5
3
5
["reversion.create_revision", "self.assertAlmostEqual", "reversion.get_date_created", "timezone.now", "timedelta"]
0
[]
The function (testGetDateCreatedDefault) defined within the public class called GetDateCreatedTest, that inherit another class.The function start at line 317 and ends at 319. 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 ...
etianen_django-reversion
GetDateCreatedTest
public
0
1
testGetDateCreatedNoBlock
def testGetDateCreatedNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.get_date_created()
1
3
1
20
0
321
323
321
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.get_date_created"]
0
[]
The function (testGetDateCreatedNoBlock) defined within the public class called GetDateCreatedTest, that inherit another class.The function start at line 321 and ends at 323. 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 ...
etianen_django-reversion
AddMetaTest
public
0
1
testAddMeta
def testAddMeta(self):with reversion.create_revision():reversion.add_meta(TestMeta, name="meta v1")obj = TestModel.objects.create()self.assertSingleRevision((obj,), meta_names=("meta v1",))
1
5
1
47
0
329
333
329
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.create_revision", "reversion.add_meta", "TestModel.objects.create", "self.assertSingleRevision"]
0
[]
The function (testAddMeta) defined within the public class called AddMetaTest, that inherit another class.The function start at line 329 and ends at 333. 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 4.0 function...
etianen_django-reversion
AddMetaTest
public
0
1
testAddMetaNoBlock
def testAddMetaNoBlock(self):with self.assertRaises(reversion.RevisionManagementError):reversion.add_meta(TestMeta, name="meta v1")
1
3
1
25
0
335
337
335
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "reversion.add_meta"]
0
[]
The function (testAddMetaNoBlock) defined within the public class called AddMetaTest, that inherit another class.The function start at line 335 and ends at 337. 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 f...
etianen_django-reversion
AddMetaTest
public
0
1
testAddMetaMultDb
def testAddMetaMultDb(self):with reversion.create_revision(using="mysql"), reversion.create_revision(using="postgres"):obj = TestModel.objects.create()reversion.add_meta(TestMeta, name="meta v1")self.assertNoRevision()self.assertSingleRevision((obj,), meta_names=("meta v1",), using="mysql")self.assertSingleRevision((ob...
1
7
1
88
0
339
345
339
self
[]
None
{"Assign": 1, "Expr": 4, "With": 1}
7
7
7
["reversion.create_revision", "reversion.create_revision", "TestModel.objects.create", "reversion.add_meta", "self.assertNoRevision", "self.assertSingleRevision", "self.assertSingleRevision"]
0
[]
The function (testAddMetaMultDb) defined within the public class called AddMetaTest, that inherit another class.The function start at line 339 and ends at 345. 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 7.0 fu...
etianen_django-reversion
CreateInitialRevisionsTest
public
0
1
testCreateInitialRevisions
def testCreateInitialRevisions(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions")self.assertSingleRevision((obj,), comment="Initial version.")
1
4
1
33
0
12
15
12
self
[]
None
{"Assign": 1, "Expr": 2}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisions) defined within the public class called CreateInitialRevisionsTest, that inherit another class.The function start at line 12 and ends at 15. 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 val...
etianen_django-reversion
CreateInitialRevisionsTest
public
0
1
testCreateInitialRevisionsAlreadyCreated
def testCreateInitialRevisionsAlreadyCreated(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions")self.callCommand("createinitialrevisions")self.assertSingleRevision((obj,), comment="Initial version.")
1
5
1
39
0
17
21
17
self
[]
None
{"Assign": 1, "Expr": 3}
4
5
4
["TestModel.objects.create", "self.callCommand", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsAlreadyCreated) defined within the public class called CreateInitialRevisionsTest, that inherit another class.The function start at line 17 and ends at 21. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsAppLabel
def testCreateInitialRevisionsAppLabel(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions", "test_app")self.assertSingleRevision((obj,), comment="Initial version.")
1
4
1
35
0
26
29
26
self
[]
None
{"Assign": 1, "Expr": 2}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsAppLabel) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 26 and ends at 29. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does no...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsAppLabelMissing
def testCreateInitialRevisionsAppLabelMissing(self):with self.assertRaises(CommandError):self.callCommand("createinitialrevisions", "boom")
1
3
1
21
0
31
33
31
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testCreateInitialRevisionsAppLabelMissing) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 31 and ends at 33. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and ...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsModel
def testCreateInitialRevisionsModel(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions", "test_app.TestModel")self.assertSingleRevision((obj,), comment="Initial version.")
1
4
1
35
0
35
38
35
self
[]
None
{"Assign": 1, "Expr": 2}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsModel) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 35 and ends at 38. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not r...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsModelMissing
def testCreateInitialRevisionsModelMissing(self):with self.assertRaises(CommandError):self.callCommand("createinitialrevisions", "test_app.boom")
1
3
1
21
0
40
42
40
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testCreateInitialRevisionsModelMissing) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 40 and ends at 42. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and doe...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsModelMissingApp
def testCreateInitialRevisionsModelMissingApp(self):with self.assertRaises(CommandError):self.callCommand("createinitialrevisions", "boom.boom")
1
3
1
21
0
44
46
44
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testCreateInitialRevisionsModelMissingApp) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 44 and ends at 46. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and ...
etianen_django-reversion
CreateInitialRevisionsAppLabelTest
public
0
1
testCreateInitialRevisionsModelNotRegistered
def testCreateInitialRevisionsModelNotRegistered(self):TestModel.objects.create()self.callCommand("createinitialrevisions", "auth.User")self.assertNoRevision()
1
4
1
25
0
48
51
48
self
[]
None
{"Expr": 3}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testCreateInitialRevisionsModelNotRegistered) defined within the public class called CreateInitialRevisionsAppLabelTest, that inherit another class.The function start at line 48 and ends at 51. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters a...
etianen_django-reversion
CreateInitialRevisionsDbTest
public
0
1
testCreateInitialRevisionsDb
def testCreateInitialRevisionsDb(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions", using="postgres")self.assertNoRevision()self.assertSingleRevision((obj,), comment="Initial version.", using="postgres")
1
5
1
46
0
57
61
57
self
[]
None
{"Assign": 1, "Expr": 3}
4
5
4
["TestModel.objects.create", "self.callCommand", "self.assertNoRevision", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsDb) defined within the public class called CreateInitialRevisionsDbTest, that inherit another class.The function start at line 57 and ends at 61. 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...
etianen_django-reversion
CreateInitialRevisionsDbTest
public
0
1
testCreateInitialRevisionsDbMySql
def testCreateInitialRevisionsDbMySql(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions", using="mysql")self.assertNoRevision()self.assertSingleRevision((obj,), comment="Initial version.", using="mysql")
1
5
1
46
0
63
67
63
self
[]
None
{"Assign": 1, "Expr": 3}
4
5
4
["TestModel.objects.create", "self.callCommand", "self.assertNoRevision", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsDbMySql) defined within the public class called CreateInitialRevisionsDbTest, that inherit another class.The function start at line 63 and ends at 67. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not retur...
etianen_django-reversion
CreateInitialRevisionsModelDbTest
public
0
1
testCreateInitialRevisionsModelDb
def testCreateInitialRevisionsModelDb(self):obj = TestModel.objects.db_manager("postgres").create()self.callCommand("createinitialrevisions", model_db="postgres")self.assertSingleRevision((obj,), comment="Initial version.", model_db="postgres")
1
4
1
46
0
73
76
73
self
[]
None
{"Assign": 1, "Expr": 2}
4
4
4
["create", "TestModel.objects.db_manager", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsModelDb) defined within the public class called CreateInitialRevisionsModelDbTest, that inherit another class.The function start at line 73 and ends at 76. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
CreateInitialRevisionsCommentTest
public
0
1
testCreateInitialRevisionsComment
def testCreateInitialRevisionsComment(self):obj = TestModel.objects.create()self.callCommand("createinitialrevisions", comment="comment v1")self.assertSingleRevision((obj,), comment="comment v1")
1
4
1
37
0
81
84
81
self
[]
None
{"Assign": 1, "Expr": 2}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsComment) defined within the public class called CreateInitialRevisionsCommentTest, that inherit another class.The function start at line 81 and ends at 84. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
CreateInitialRevisionsCommentTest
public
0
1
testCreateInitialRevisionsComment
def testCreateInitialRevisionsComment(self):obj = TestModel.objects.create()meta_name = "meta name"meta = json.dumps({"test_app.TestMeta": {"name": meta_name}})self.callCommand("createinitialrevisions", "--meta", meta)self.assertSingleRevision((obj,), meta_names=(meta_name, ), comment="Initial version.")
1
6
1
63
0
88
93
88
self
[]
None
{"Assign": 1, "Expr": 2}
3
4
3
["TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testCreateInitialRevisionsComment) defined within the public class called CreateInitialRevisionsCommentTest, that inherit another class.The function start at line 88 and ends at 93. It contains 6 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
DeleteRevisionsTest
public
0
1
testDeleteRevisions
def testDeleteRevisions(self):with reversion.create_revision():TestModel.objects.create()self.callCommand("deleterevisions")self.assertNoRevision()
1
5
1
30
0
98
102
98
self
[]
None
{"Expr": 3, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisions) defined within the public class called DeleteRevisionsTest, that inherit another class.The function start at line 98 and ends at 102. 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 declar...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsAppLabel
def testDeleteRevisionsAppLabel(self):with reversion.create_revision():TestModel.objects.create()self.callCommand("deleterevisions", "test_app")self.assertNoRevision()
1
5
1
32
0
107
111
107
self
[]
None
{"Expr": 3, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsAppLabel) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 107 and ends at 111. 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...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsAppLabelMissing
def testDeleteRevisionsAppLabelMissing(self):with self.assertRaises(CommandError):self.callCommand("deleterevisions", "boom")
1
3
1
21
0
113
115
113
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testDeleteRevisionsAppLabelMissing) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 113 and ends at 115. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ret...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsModel
def testDeleteRevisionsModel(self):with reversion.create_revision():TestModel.objects.create()self.callCommand("deleterevisions", "test_app.TestModel")self.assertNoRevision()
1
5
1
32
0
117
121
117
self
[]
None
{"Expr": 3, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsModel) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 117 and ends at 121. 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 va...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsModelMissing
def testDeleteRevisionsModelMissing(self):with self.assertRaises(CommandError):self.callCommand("deleterevisions", "test_app.boom")
1
3
1
21
0
123
125
123
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testDeleteRevisionsModelMissing) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 123 and ends at 125. 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...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsModelMissingApp
def testDeleteRevisionsModelMissingApp(self):with self.assertRaises(CommandError):self.callCommand("deleterevisions", "boom.boom")
1
3
1
21
0
127
129
127
self
[]
None
{"Expr": 1, "With": 1}
2
3
2
["self.assertRaises", "self.callCommand"]
0
[]
The function (testDeleteRevisionsModelMissingApp) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 127 and ends at 129. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ret...
etianen_django-reversion
DeleteRevisionsAppLabelTest
public
0
1
testDeleteRevisionsModelNotRegistered
def testDeleteRevisionsModelNotRegistered(self):with reversion.create_revision():obj = TestModel.objects.create()self.callCommand("deleterevisions", "auth.User")self.assertSingleRevision((obj,))
1
5
1
38
0
131
135
131
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testDeleteRevisionsModelNotRegistered) defined within the public class called DeleteRevisionsAppLabelTest, that inherit another class.The function start at line 131 and ends at 135. It contains 5 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not ...
etianen_django-reversion
DeleteRevisionsDbTest
public
0
1
testDeleteRevisionsDb
def testDeleteRevisionsDb(self):with reversion.create_revision(using="postgres"):TestModel.objects.create()self.callCommand("deleterevisions", using="postgres")self.assertNoRevision(using="postgres")
1
5
1
40
0
141
145
141
self
[]
None
{"Expr": 3, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsDb) defined within the public class called DeleteRevisionsDbTest, that inherit another class.The function start at line 141 and ends at 145. 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 d...
etianen_django-reversion
DeleteRevisionsDbTest
public
0
1
testDeleteRevisionsDbMySql
def testDeleteRevisionsDbMySql(self):with reversion.create_revision(using="mysql"):TestModel.objects.create()self.callCommand("deleterevisions", using="mysql")self.assertNoRevision(using="mysql")
1
5
1
40
0
147
151
147
self
[]
None
{"Expr": 3, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsDbMySql) defined within the public class called DeleteRevisionsDbTest, that inherit another class.The function start at line 147 and ends at 151. 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....
etianen_django-reversion
DeleteRevisionsDbTest
public
0
1
testDeleteRevisionsDbNoMatch
def testDeleteRevisionsDbNoMatch(self):with reversion.create_revision():obj = TestModel.objects.create()self.callCommand("deleterevisions", using="postgres")self.assertSingleRevision((obj,))
1
5
1
40
0
153
157
153
self
[]
None
{"Assign": 1, "Expr": 2, "With": 1}
4
5
4
["reversion.create_revision", "TestModel.objects.create", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testDeleteRevisionsDbNoMatch) defined within the public class called DeleteRevisionsDbTest, that inherit another class.The function start at line 153 and ends at 157. 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 valu...
etianen_django-reversion
DeleteRevisionsModelDbTest
public
0
1
testDeleteRevisionsModelDb
def testDeleteRevisionsModelDb(self):with reversion.create_revision():TestModel.objects.db_manager("postgres").create()self.callCommand("deleterevisions", model_db="postgres")self.assertNoRevision(using="postgres")
1
5
1
42
0
163
167
163
self
[]
None
{"Expr": 3, "With": 1}
5
5
5
["reversion.create_revision", "create", "TestModel.objects.db_manager", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsModelDb) defined within the public class called DeleteRevisionsModelDbTest, that inherit another class.The function start at line 163 and ends at 167. 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 v...
etianen_django-reversion
DeleteRevisionsDaysTest
public
0
1
testDeleteRevisionsDays
def testDeleteRevisionsDays(self):date_created = timezone.now() - timedelta(days=20)with reversion.create_revision():TestModel.objects.create()reversion.set_date_created(date_created)self.callCommand("deleterevisions", days=19)self.assertNoRevision()
1
7
1
54
0
172
178
172
self
[]
None
{"Assign": 1, "Expr": 4, "With": 1}
7
7
7
["timezone.now", "timedelta", "reversion.create_revision", "TestModel.objects.create", "reversion.set_date_created", "self.callCommand", "self.assertNoRevision"]
0
[]
The function (testDeleteRevisionsDays) defined within the public class called DeleteRevisionsDaysTest, that inherit another class.The function start at line 172 and ends at 178. 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. ...
etianen_django-reversion
DeleteRevisionsDaysTest
public
0
1
testDeleteRevisionsDaysNoMatch
def testDeleteRevisionsDaysNoMatch(self):date_created = timezone.now() - timedelta(days=20)with reversion.create_revision():obj = TestModel.objects.create()reversion.set_date_created(date_created)self.callCommand("deleterevisions", days=21)self.assertSingleRevision((obj,), date_created=date_created)
1
7
1
64
0
180
186
180
self
[]
None
{"Assign": 2, "Expr": 3, "With": 1}
7
7
7
["timezone.now", "timedelta", "reversion.create_revision", "TestModel.objects.create", "reversion.set_date_created", "self.callCommand", "self.assertSingleRevision"]
0
[]
The function (testDeleteRevisionsDaysNoMatch) defined within the public class called DeleteRevisionsDaysTest, that inherit another class.The function start at line 180 and ends at 186. 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 ...
etianen_django-reversion
DeleteRevisionsKeepTest
public
0
1
testDeleteRevisionsKeep
def testDeleteRevisionsKeep(self):with reversion.create_revision():obj_1 = TestModel.objects.create()reversion.set_comment("obj_1 v1")with reversion.create_revision():obj_1.save()reversion.set_comment("obj_1 v2")with reversion.create_revision():obj_2 = TestModel.objects.create()reversion.set_comment("obj_2 v1")with rev...
1
19
1
146
0
191
209
191
self
[]
None
{"Assign": 3, "Expr": 10, "With": 5}
18
19
18
["reversion.create_revision", "TestModel.objects.create", "reversion.set_comment", "reversion.create_revision", "obj_1.save", "reversion.set_comment", "reversion.create_revision", "TestModel.objects.create", "reversion.set_comment", "reversion.create_revision", "obj_2.save", "reversion.set_comment", "reversion.create_r...
0
[]
The function (testDeleteRevisionsKeep) defined within the public class called DeleteRevisionsKeepTest, that inherit another class.The function start at line 191 and ends at 209. It contains 19 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value....
etianen_django-reversion
RevisionMiddlewareTest
public
0
1
testCreateRevision
def testCreateRevision(self):response = self.client.post("/test-app/save-obj/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,))
1
4
1
38
0
15
18
15
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 RevisionMiddlewareTest, that inherit another class.The function start at line 15 and ends at 18. 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 decla...
etianen_django-reversion
RevisionMiddlewareTest
public
0
1
testCreateRevisionError
def testCreateRevisionError(self):with self.assertRaises(Exception):self.client.post("/test-app/save-obj-error/")self.assertNoRevision()
1
4
1
26
0
20
23
20
self
[]
None
{"Expr": 2, "With": 1}
3
4
3
["self.assertRaises", "self.client.post", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionError) defined within the public class called RevisionMiddlewareTest, that inherit another class.The function start at line 20 and ends at 23. 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 ...
etianen_django-reversion
RevisionMiddlewareTest
public
0
1
testCreateRevisionGet
def testCreateRevisionGet(self):self.client.get("/test-app/create-revision/")self.assertNoRevision()
1
3
1
18
0
25
27
25
self
[]
None
{"Expr": 2}
2
3
2
["self.client.get", "self.assertNoRevision"]
0
[]
The function (testCreateRevisionGet) defined within the public class called RevisionMiddlewareTest, that inherit another class.The function start at line 25 and ends at 27. 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 de...
etianen_django-reversion
RevisionMiddlewareUserTest
public
0
1
testCreateRevisionUser
def testCreateRevisionUser(self):response = self.client.post("/test-app/save-obj/")obj = TestModel.objects.get(pk=response.content)self.assertSingleRevision((obj,), user=self.user)
1
4
1
44
0
33
36
33
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 RevisionMiddlewareUserTest, that inherit another class.The function start at line 33 and ends at 36. 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. ...
etianen_django-reversion
GetForModelTest
public
0
1
testGetForModel
def testGetForModel(self):with reversion.create_revision():obj = TestModel.objects.create()self.assertEqual(Version.objects.get_for_model(obj.__class__).count(), 1)
1
4
1
42
0
15
18
15
self
[]
None
{"Assign": 1, "Expr": 1, "With": 1}
5
4
5
["reversion.create_revision", "TestModel.objects.create", "self.assertEqual", "count", "Version.objects.get_for_model"]
0
[]
The function (testGetForModel) defined within the public class called GetForModelTest, that inherit another class.The function start at line 15 and ends at 18. 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 fu...